Coder Social home page Coder Social logo

remeda / remeda Goto Github PK

View Code? Open in Web Editor NEW
3.9K 3.9K 125.0 7.31 MB

A utility library for JavaScript and TypeScript.

Home Page: http://remedajs.com

License: MIT License

JavaScript 2.12% TypeScript 97.88%
functional programming typescript utility

remeda's Introduction

Remeda

The first "data-first" and "data-last" utility library designed especially for TypeScript.

GitHub CI Codecov NPM Dependencies

Installation

npm i remeda
yarn add remeda

Then in .js or .ts

import * as R from "remeda"; // tree-shaking supported!

Why Remeda?

There are no good utility libraries that work well with TypeScript. When working with Lodash or Ramda you must sometimes annotate types manually. Remeda is written and tested in TypeScript and that means there won't be any problems with custom typings.

What's "data-first" and "data-last"?

Functional programming is nice, and it makes the code more readable. However there are situations where you don't need "pipes", and you want to call just a single function.

// Remeda
R.pick(obj, ["firstName", "lastName"]);

// Ramda
R.pick(["firstName", "lastName"], obj);

// Lodash
_.pick(obj, ["firstName", "lastName"]);

For readers looking for data-last forms like R.filter(fn)(array), Remeda supports it. Keep reading along!

In the above example, "data-first" approach is more natural and more programmer friendly because when you type the second argument, you get the auto-complete from IDE. It's not possible to get the auto-complete in Ramda because the data argument is not provided.

"data-last" approach is helpful when writing data transformations aka pipes.

const users = [
  { name: "john", age: 20, gender: "m" },
  { name: "marry", age: 22, gender: "f" },
  { name: "samara", age: 24, gender: "f" },
  { name: "paula", age: 24, gender: "f" },
  { name: "bill", age: 33, gender: "m" },
];

// Remeda
R.pipe(
  users,
  R.filter((x) => x.gender === "f"),
  R.groupBy((x) => x.age),
);

// Ramda
R.pipe(
  R.filter((x) => x.gender === "f"),
  R.groupBy((x) => x.age),
)(users); // broken typings in TS :(

// Lodash
_(users)
  .filter((x) => x.gender === "f")
  .groupBy((x) => x.age)
  .value();

// Lodash-fp
_.flow(
  _.filter((x) => x.gender === "f"),
  _.groupBy((x) => x.age),
)(users); // broken typings in TS :(

Mixing paradigms can be cumbersome in Lodash because it requires importing two different methods. Remeda implements all methods in two versions, and the correct overload is picked based on the number of provided arguments. The "data-last" version must always have one argument less than the "data-first" version.

// Remeda
R.pick(obj, ["firstName", "lastName"]); // data-first
R.pipe(obj, R.pick(["firstName", "lastName"])); // data-last

R.pick(["firstName", "lastName"], obj); // error, this won't work!
R.pick(["firstName", "lastName"])(obj); // this will work but the types cannot be inferred

Lazy evaluation

Many functions support lazy evaluation when using pipe or piped. These functions have a pipeable tag in the documentation. Lazy evaluation is not supported in Ramda and only partially supported in lodash.

// Get first 3 unique values
const arr = [1, 2, 2, 3, 3, 4, 5, 6];

const result = R.pipe(
  arr,                    // only four iterations instead of eight (array.length)
  R.map(x => {
    console.log('iterate', x);
    return x;
  }),
  R.uniq(),
  R.take(3)
); // => [1, 2, 3]

/**
 * Console output:
 * iterate 1
 * iterate 2
 * iterate 2
 * iterate 3
 * /

Indexed version

Iterable functions have an extra property indexed which is the same function with iterator (element, index, array).

const arr = [10, 12, 13, 3];

// filter even values
R.filter(arr, (x) => x % 2 === 0); // => [10, 12]

// filter even indexes
R.filter.indexed(arr, (x, i) => i % 2 === 0); // => [10, 13]

For Lodash and Ramda users

Please check function mapping in mapping.md.

Remeda Design Goals

  1. The usage must be programmer friendly, and that's more important than following XYZ paradigm strictly.
  2. Manual annotation should never be required, and proper typings should infer everything. The only exception is the first function in piped.
  3. ES6 polyfill is required. Core methods are reused, and data structure (like Map/Set) are not re-implemented.
  4. The implementation of each function should be as minimal as possible. Tree-shaking is supported by default. (Do you know that lodash.keyBy has 14KB after minification?)
  5. All functions are immutable, and there are no side-effects.
  6. Fixed number of arguments.

MIT

remeda's People

Contributors

brodzko avatar cjquines avatar clemgbld avatar cloud-walker avatar dartess avatar dependabot[bot] avatar eranhirsch avatar fneco avatar koichikiyokawa avatar landonschropp avatar larvanitis avatar leopoldarkham avatar lstkz avatar mechamobau avatar michal-weglarz avatar montzkie18 avatar pekam avatar rodrigofariow avatar santialbo avatar sirjayearn avatar sobstel avatar somnicattus avatar steevsachs avatar sushantdhiman avatar tbui17 avatar thelawclaw11 avatar tkdodo avatar vlad-yakovlev avatar xanderbarkhatov avatar yanick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

remeda's Issues

toPairs does not take Map as input

It appears that toPairs doesn't take a Map as input, only POJO {[key: string]: ...} . Or are we supposed to use the Map's own toPairs() function? When piping functions this would be a bit odd I think.

Is this repo still active?

Should we be worried that there does not seem to be any traction on that repo for a couple of months now? Is this repo still maintained? What can we do to get the open PRs merged for example ... ?

Optional TypeOverides

Hello, i am currently learning Typescript and i an rewriting my utility library (I created as i was learning javascript) with types. I struggled to even know where to begin, and after realizing a lot of my functions are just too flexible in order to produce good typings (i.e: my reduce fn accepts [],'',{},maps,sets). So my first step is breaking these flexible functions down and have reduceArr, reduceObj etc.
After I get that down the next issue ive came across was being able to have the flexibility of optionally assigning types in the overloads, and i wanted to get your opinion of this:

I'll use your take method for example:
currently with the overload export function take<T>(n: number): (array: T[]) => T[]
would yield {}[] for take(3)([1, 2, 3, 4, 3, 2, 1])
and within pipeconst e = pipe( [1, 2, 3, 4, 3, 2, 1], take(3)) yields number[]

But if I were to do const take3 = take(3) and pipe( [1, 2, 3, 4, 3, 2, 1], take3) would yield {}[]
In order to get the correct type, i would have to strictly assign the input type const take3Strict = take<number>(3).

A simple solution would be moving the generic export function take(n: number): <T>(array: T[]) => T[],
but now loses the flexibility if i wanted to create a take3Strict . So i tried to think of a way of how to make the overloads a bit more flexible and did this:

export function take<T0 = never>(n: number,): <T extends [T0] extends [never] ? any : T0>(array: T[]) => T[]

I know take is a little too simple, but wanted to share this if it may inspire you in any way.

Include undefined in result of groupBy

Current typing

export function groupBy<T>(
  items: readonly T[],
  fn: (item: T) => any
): Record<string, T[]>;

can lead to wrong assumption:

// no error
const grouped = groupBy([{ a: 1 }], ({ a }) => a)['notExists'][0].a

Therefore I propose to change the result type to Record<string, T[] | undefined>. Be aware that it's a breaking change.

Ramda types for prop and pluck are better than remeda ones

I general I finding that remeda is better typed than ramda, but I found a case where is still better.

When making a curried pluck or map(prop) the remeda types system doesn't detects my intent

import { pluck } from "ramda";
import { map, prop } from "remeda";

const slugsArray = [{ slug: "a" }, { slug: "b" }];
const wrongSlugsArray = [{ wrongslug: "a" }, { wrongslug: "b" }];

// Argument of type '"slug"' is not assignable to parameter of type 'never'.
const plukSlugs = map(prop("slug"));

// Ramda works nice
const ramdaPlukSlugs = pluck("slug");

// This one works fine
const ramdaResult = ramdaPlukSlugs(slugsArray);

// Ramda complains wrongSlugsArray doesn't has the key that is expecting
const ramdaWrongResult = ramdaPlukSlugs(wrongSlugsArray);
// Property 'slug' is missing in type '{ wrongslug: string; }' but required in type 'Record<"slug", {}>'.

Any option to change `category: Array` for equals?

Just looked at the source for the equals() function because:

  • I didn't click the "expand arguments" in the docs
  • I read the Array in the docs and wasn't sure if it would also apply to objects

It seems like functions can only belong to a single category. Would Object make more sense? I'm not really sure. I'd think maybe folks assume that an Array is also an Object, but maybe Object is just as unclear as Array.

If you've already considered this issue and decided on Array, feel free to close this issue without comment. Thanks again for remeda, really nice to have typescript native util functions.

There are plans to add more functions?

Thank you very much for this library, I think is really awesome.

I'm missing some utility functions from ramda like, always, isEmpty, isNil, adjust, cond and assocPath

There is a roadmap for the project?

Plans to support case changing functions?

Firstly, thanks for this library, first class typescript support is super awesome!

I was looking for a typescript friendly alternative to lodash hoping to use _.upperFirst() which changes the first character of a string to uppercase. Any plans to add such case changing functionality to remeda?

Generator based zip

I kind of like a generator based zip function that can take a few more parameters than just 2, is this something that would be a fit for remeda? I can't quite get my head around what it would look like as a data-last API.

export function* zip<T1, T2, T3, T4, T5>(
  A: T1[],
  B: T2[],
  C: T3[] = [],
  D: T4[] = [],
  E: T5[] = [],
): Generator<[T1, T2, T3, T4, T5]> {
  for (let i = 0; i < A.length; i++) {
    yield [A[i], B[i], C && C[i], D && D[i], E && E[i]];
  }
}

var colors = ["red", "blue", "green"];
var weights = [100, 200, 300];
var dates = [new Date(2021, 1, 1), new Date(2021, 1, 2), new Date(2021, 1, 3)];

// use with for...of
for (const [color, weight, date] of zip(colors, weights, dates)) {
  console.log(`${color.toUpperCase()}, ${weight / 100}, ${date.toTimeString()}`);
}

// or spread to map
console.log(
  [...zip(colors, weights, dates)].map(([c, w, d]) => ({c: c.charAt(0), w: w / 2, d})
);

I'm happy to polish it up and submit a PR if this is at all interesting.

How to properly make use of pathOr()?

If I have a snippet like this:

import { pathOr } from 'remeda';

let input = {
  a: {
    b: {
      c: 42,
    },
  },
};

let path = ['a', 'b', 'c'];
let output = pathOr(input, path, null);

Typescript complains the path variable does not satisfy the typings:

image

How can I properly make the above work?

Also, if I increase the nestedness to a fourth level:

import { pathOr } from 'remeda';

let input = {
  a: {
    b: {
      c: {
        d: 42,
      },
    },
  },
};

let output = pathOr(input, ['a', 'b', 'c', 'd'], null);

I get the following error:

Argument of type '["a", "b", "c", "d"]' is not assignable to parameter of type '["a", "b", "c"]'.
Types of property 'length' are incompatible.
Type '4' is not assignable to type '3'.ts(2345)

Looking at the source code, it seems that only typings up to the third level are provided?


PS: Thanks for putting work into remeda, it's very much needed. ๐Ÿ‘

Guards narrow to `never` when starting from `unknown`

all guards narrow to never when you have an input that is of type unknown.

Given:

x: unknown

calling:

isBoolean(x)

will result in x having the the type never.

I would expect x to be of type boolean then. Note that it works fine if you start from e.g. boolean | string

@digimuza maybe you can help us out here?

Proposal for some functions

I made some functions using typescript that maybe can add value to remeda, they look like this.

export const addTo = <K extends object>(arrayToUpdate: K[], newValue: K) =>
  concat(arrayToUpdate, [newValue]);

export const swapWhen = <K extends object>(key: keyof K, newValue: K) => (
  oldValue: K,
): K => (oldValue[key] !== newValue[key] ? oldValue : newValue);

export const updateBy = <K extends object>(
  key: keyof K,
  arrayToUpdate: K[],
  newValue: K,
): K[] => arrayToUpdate.map(swapWhen(key, newValue));

export const deleteBy = <K extends object>(
  key: keyof K,
  value: K[keyof K],
  arrayToUpdate: K[],
): K[] => arrayToUpdate.filter((object) => object[key] !== value);

What do you think?

"pick" function broken since 0.0.24

Probably caused by cfecd4e

To reproduce (prints empty object):

console.log(
  pick(new URL("https://github.com/remeda/remeda"), ["origin", "pathname", "search"]),
);

Consider replacing:

    if (object.hasOwnProperty(name)) {
      acc[name] = object[name];
    }

with

    if (name in object) {
      acc[name] = object[name];
    }

toPairs does not work in pipe

const obj = { foo: "bar" }
const result = R.pipe(obj, 
  R.toPairs(),
  ...
)

Typescript is complaining that toPairs requires an argument.

add mergeDeep

Hi,

great work with this library!

I was wondering if you could add a mergeDeep (mergeDeepLeft or mergeDeepRight) to the library? That is especially useful to merge defaults into nested config objects etc.

Thanks

R.clone loses type

The clone function converts objects/arrays passed to it to any type which contradicts the idea of not having to cast or type when using remeda.
This is easy to fix and I already created a pull-request: #25

Type of mergeAll parameter

function f(a: string[]) {
  return R.mergeAll(R.map(a, x => ({ [x]: x })))
}

Typescript gives me an error for the parameter of mergeAll. It seems that the function is expecting some sort of tuple type, as opposed to an array.

No overload matches this call.
  The last overload gave the following error.
    Argument of type '{ [x: string]: string; }[]' is not assignable to parameter of type '[{ [x: string]: string; }, { [x: string]: string; }, { [x: string]: string; }, { [x: string]: string; }, { [x: string]: string; }]'.
      Type '{ [x: string]: string; }[]' is missing the following properties from type '[{ [x: string]: string; }, { [x: string]: string; }, { [x: string]: string; }, { [x: string]: string; }, { [x: string]: string; }]': 0, 1, 2, 3, 4

Possiblity to directly use iterators ?

I would want to do something like this:

const myMap = new Map<string, T>(...);
const iterator: IterableIterator<T> = myMap.values();

const first = R.pipe(
  iterator,
  R.first
);

Problem is R.first accepts a T[] and not an IterableIterator<T>, so my first var is of type unknown instead of being of type T;

error TS7016: Could not find a declaration file for module 'remeda'.

Hi!

Just installed your library via npm in Angular 6 project, but when trying to import it in a file I get the compilation error:

error TS7016: Could not find a declaration file for module 'remeda'. 
<REMOVED_FOR_BREVITY>node_modules/remeda/dist/commonjs/index.js' implicitly has an 'any' type.

Try `npm install @types/remeda` if it exists or add a new declaration (.d.ts) file containing `declare module 'remeda';

Is it a bug or am I missing something? Angular 6 has a dependency on [email protected] whereas you're using the newest compilator. Could that be the case?

Pick returns undefined values for keys not in source object

Hi Remeda Team,

This is more of a clarification than an actual bug, as i don't know what the expected response is supposed to be.

Right now, if you use pick to pull properties from an object:

const R = require('remeda')

const obj = { a: 1 , b: 2 } 

R.pick(obj, ['a', 'c'])
> Object {a: 1, c: undefined} 

pick, in Ramda, effectively ignores that property and does not return it in the resulting object:

const R = require('ramda')

const obj = { a: 1 , b: 2 } 

R.pick(obj, ['a', 'c'])
> Object {a: 1 } 

Here's a runkit link with the 2 side by side: https://runkit.com/cilquirm/5f205d2827d3e10013e2fb45

Should this be considered a bug? I think it's a strange side effect to add properties that aren't present in the source object, and it's definitely tripped me up before ( not to mention it doesn't jive with the Ramda analog ).

Happy to open a PR to resolve with tests if you think this makes sense.

Focus (over) and lens functions from Ramda?

Hi,

Is there any Remeda implementation planned / alternative solution for over and lens... functions like you can find in Ramda?
We would like to move away from Ramda completely, but these are crucial functions for some transformation pipeline.

better example for lazy evaluation?

I know of course what lazy evaluation is, but I'm not sure about the example on the readme?
where exactly is the lazy evaluation in this example? is it the fact that console.log runs four times before the entire pipe is done? can you maybe add an inline comment were/how lazy eval happens?

flatten does not work in pipe

When running example from the document (remeda 0.0.6, typescript 3.0.3),

R.flatten([[1, 2], [3], [4, 5]]) // => [1, 2, 3, 4, 5]
R.pipe(
  [[1, 2], [3], [4, 5]],
  R.flatten()
) // => TypeError: Cannot read property 'hasNext' of undefined

Reduce size of package

Hello, @BetterCallSKY,

I am interested in your package and I want to thank you very much for it ๐ŸŽ‰

Would you like to reduce the size of your package?

Right now the package includes the following files:

  • src โ€“ source files
  • scripts
  • dist/{es,commonjs}/*.test.js โ€“ test files
  • dist/{es,commonjs}/*.d.ts.map โ€“ Map files from JS to d.ts to TS files.

At least we can get rid of the tests and common files like tsconfig, .travis.yml and etc. Also we can drop the yarn.lock file from the package because your package has no dependencies. I'd also get rid of the map files, but that's your choice.

$ npm pack --dry
npm notice
npm notice ๐Ÿ“ฆ  [email protected]
npm notice === Tarball Contents ===
npm notice 1.5kB   package.json
npm notice 96B     .travis.yml
npm notice 1.1kB   LICENSE
npm notice 4.4kB   README.md
npm notice 5.1kB   tsconfig.json
npm notice 119.0kB yarn.lock
npm notice 180B    dist/commonjs/_counter.d.ts
npm notice 146B    dist/commonjs/_counter.d.ts.map
npm notice 365B    dist/commonjs/_counter.js
npm notice 304B    dist/commonjs/_reduceLazy.d.ts
npm notice 482B    dist/commonjs/_reduceLazy.d.ts.map
npm notice 481B    dist/commonjs/_reduceLazy.js
npm notice 123B    dist/commonjs/_toLazyIndexed.d.ts
npm notice 156B    dist/commonjs/_toLazyIndexed.d.ts.map
npm notice 159B    dist/commonjs/_toLazyIndexed.js
npm notice 112B    dist/commonjs/_toSingle.d.ts
npm notice 146B    dist/commonjs/_toSingle.d.ts.map
npm notice 153B    dist/commonjs/_toSingle.js
npm notice 264B    dist/commonjs/_types.d.ts
npm notice 441B    dist/commonjs/_types.d.ts.map
npm notice 77B     dist/commonjs/_types.js
npm notice 904B    dist/commonjs/addProp.d.ts
npm notice 481B    dist/commonjs/addProp.d.ts.map
npm notice 602B    dist/commonjs/addProp.js
npm notice 53B     dist/commonjs/addProp.test.d.ts
npm notice 121B    dist/commonjs/addProp.test.d.ts.map
npm notice 537B    dist/commonjs/addProp.test.js
npm notice 1.1kB   dist/commonjs/anyPass.d.ts
npm notice 387B    dist/commonjs/anyPass.d.ts.map
npm notice 298B    dist/commonjs/anyPass.js
npm notice 53B     dist/commonjs/anyPass.test.d.ts
npm notice 121B    dist/commonjs/anyPass.test.d.ts.map
npm notice 704B    dist/commonjs/anyPass.test.js
npm notice 1.0kB   dist/commonjs/chunk.d.ts
npm notice 325B    dist/commonjs/chunk.d.ts.map
npm notice 525B    dist/commonjs/chunk.js
npm notice 51B     dist/commonjs/chunk.test.d.ts
npm notice 117B    dist/commonjs/chunk.test.d.ts.map
npm notice 799B    dist/commonjs/chunk.test.js
npm notice 950B    dist/commonjs/clamp.d.ts
npm notice 398B    dist/commonjs/clamp.d.ts.map
npm notice 475B    dist/commonjs/clamp.js
npm notice 51B     dist/commonjs/clamp.test.d.ts
npm notice 117B    dist/commonjs/clamp.test.d.ts.map
npm notice 386B    dist/commonjs/clamp.test.js
npm notice 404B    dist/commonjs/clone.d.ts
npm notice 155B    dist/commonjs/clone.d.ts.map
npm notice 1.9kB   dist/commonjs/clone.js
npm notice 51B     dist/commonjs/clone.test.d.ts
npm notice 117B    dist/commonjs/clone.test.d.ts.map
npm notice 6.7kB   dist/commonjs/clone.test.js
npm notice 380B    dist/commonjs/compact.d.ts
npm notice 176B    dist/commonjs/compact.d.ts.map
npm notice 477B    dist/commonjs/compact.js
npm notice 53B     dist/commonjs/compact.test.d.ts
npm notice 121B    dist/commonjs/compact.test.d.ts.map
npm notice 418B    dist/commonjs/compact.test.js
npm notice 624B    dist/commonjs/concat.d.ts
npm notice 385B    dist/commonjs/concat.d.ts.map
npm notice 267B    dist/commonjs/concat.js
npm notice 52B     dist/commonjs/concat.test.d.ts
npm notice 119B    dist/commonjs/concat.test.d.ts.map
npm notice 529B    dist/commonjs/concat.test.js
npm notice 1.4kB   dist/commonjs/createPipe.d.ts
npm notice 2.1kB   dist/commonjs/createPipe.d.ts.map
npm notice 386B    dist/commonjs/createPipe.js
npm notice 56B     dist/commonjs/createPipe.test.d.ts
npm notice 127B    dist/commonjs/createPipe.test.d.ts.map
npm notice 455B    dist/commonjs/createPipe.test.js
npm notice 1.1kB   dist/commonjs/difference.d.ts
npm notice 423B    dist/commonjs/difference.d.ts.map
npm notice 938B    dist/commonjs/difference.js
npm notice 56B     dist/commonjs/difference.test.d.ts
npm notice 127B    dist/commonjs/difference.test.d.ts.map
npm notice 976B    dist/commonjs/difference.test.js
npm notice 953B    dist/commonjs/drop.d.ts
npm notice 393B    dist/commonjs/drop.d.ts.map
npm notice 830B    dist/commonjs/drop.js
npm notice 50B     dist/commonjs/drop.test.d.ts
npm notice 115B    dist/commonjs/drop.test.d.ts.map
npm notice 877B    dist/commonjs/drop.test.js
npm notice 713B    dist/commonjs/dropLast.d.ts
npm notice 320B    dist/commonjs/dropLast.d.ts.map
npm notice 313B    dist/commonjs/dropLast.js
npm notice 54B     dist/commonjs/dropLast.test.d.ts
npm notice 123B    dist/commonjs/dropLast.test.d.ts.map
npm notice 251B    dist/commonjs/dropLast.test.js
npm notice 949B    dist/commonjs/equals.d.ts
npm notice 282B    dist/commonjs/equals.d.ts.map
npm notice 2.0kB   dist/commonjs/equals.js
npm notice 52B     dist/commonjs/equals.test.d.ts
npm notice 119B    dist/commonjs/equals.test.d.ts.map
npm notice 12.4kB  dist/commonjs/equals.test.js
npm notice 1.7kB   dist/commonjs/filter.d.ts
npm notice 770B    dist/commonjs/filter.d.ts.map
npm notice 1.1kB   dist/commonjs/filter.js
npm notice 52B     dist/commonjs/filter.test.d.ts
npm notice 119B    dist/commonjs/filter.test.d.ts.map
npm notice 1.3kB   dist/commonjs/filter.test.js
npm notice 1.8kB   dist/commonjs/find.d.ts
npm notice 792B    dist/commonjs/find.d.ts.map
npm notice 1.1kB   dist/commonjs/find.js
npm notice 50B     dist/commonjs/find.test.d.ts
npm notice 115B    dist/commonjs/find.test.d.ts.map
npm notice 1.3kB   dist/commonjs/find.test.js
npm notice 2.1kB   dist/commonjs/findIndex.d.ts
npm notice 779B    dist/commonjs/findIndex.d.ts.map
npm notice 1.4kB   dist/commonjs/findIndex.js
npm notice 55B     dist/commonjs/findIndex.test.d.ts
npm notice 125B    dist/commonjs/findIndex.test.d.ts.map
npm notice 1.3kB   dist/commonjs/findIndex.test.js
npm notice 788B    dist/commonjs/first.d.ts
npm notice 360B    dist/commonjs/first.d.ts.map
npm notice 650B    dist/commonjs/first.js
npm notice 51B     dist/commonjs/first.test.d.ts
npm notice 117B    dist/commonjs/first.test.d.ts.map
npm notice 2.5kB   dist/commonjs/first.test.js
npm notice 1.2kB   dist/commonjs/flatMap.d.ts
npm notice 551B    dist/commonjs/flatMap.d.ts.map
npm notice 941B    dist/commonjs/flatMap.js
npm notice 53B     dist/commonjs/flatMap.test.d.ts
npm notice 121B    dist/commonjs/flatMap.test.d.ts.map
npm notice 1.2kB   dist/commonjs/flatMap.test.js
npm notice 956B    dist/commonjs/flatten.d.ts
npm notice 485B    dist/commonjs/flatten.d.ts.map
npm notice 890B    dist/commonjs/flatten.js
npm notice 53B     dist/commonjs/flatten.test.d.ts
npm notice 121B    dist/commonjs/flatten.test.d.ts.map
npm notice 935B    dist/commonjs/flatten.test.js
npm notice 1.2kB   dist/commonjs/flattenDeep.d.ts
npm notice 799B    dist/commonjs/flattenDeep.d.ts.map
npm notice 1.3kB   dist/commonjs/flattenDeep.js
npm notice 57B     dist/commonjs/flattenDeep.test.d.ts
npm notice 129B    dist/commonjs/flattenDeep.test.d.ts.map
npm notice 969B    dist/commonjs/flattenDeep.test.js
npm notice 1.9kB   dist/commonjs/forEach.d.ts
npm notice 767B    dist/commonjs/forEach.d.ts.map
npm notice 1.2kB   dist/commonjs/forEach.js
npm notice 53B     dist/commonjs/forEach.test.d.ts
npm notice 121B    dist/commonjs/forEach.test.d.ts.map
npm notice 2.0kB   dist/commonjs/forEach.test.js
npm notice 841B    dist/commonjs/groupBy.d.ts
npm notice 771B    dist/commonjs/groupBy.d.ts.map
npm notice 1.1kB   dist/commonjs/groupBy.js
npm notice 53B     dist/commonjs/groupBy.test.d.ts
npm notice 121B    dist/commonjs/groupBy.test.d.ts.map
npm notice 994B    dist/commonjs/groupBy.test.js
npm notice 88B     dist/commonjs/identity.d.ts
npm notice 155B    dist/commonjs/identity.d.ts.map
npm notice 153B    dist/commonjs/identity.js
npm notice 1.4kB   dist/commonjs/index.d.ts
npm notice 1.2kB   dist/commonjs/index.d.ts.map
npm notice 1.8kB   dist/commonjs/index.js
npm notice 1.2kB   dist/commonjs/indexBy.d.ts
npm notice 772B    dist/commonjs/indexBy.d.ts.map
npm notice 694B    dist/commonjs/indexBy.js
npm notice 53B     dist/commonjs/indexBy.test.d.ts
npm notice 121B    dist/commonjs/indexBy.test.d.ts.map
npm notice 989B    dist/commonjs/indexBy.test.js
npm notice 1.0kB   dist/commonjs/intersection.d.ts
npm notice 423B    dist/commonjs/intersection.d.ts.map
npm notice 961B    dist/commonjs/intersection.js
npm notice 58B     dist/commonjs/intersection.test.d.ts
npm notice 131B    dist/commonjs/intersection.test.d.ts.map
npm notice 466B    dist/commonjs/intersection.test.js
npm notice 283B    dist/commonjs/last.d.ts
npm notice 170B    dist/commonjs/last.d.ts.map
npm notice 360B    dist/commonjs/last.js
npm notice 50B     dist/commonjs/last.test.d.ts
npm notice 115B    dist/commonjs/last.test.d.ts.map
npm notice 287B    dist/commonjs/last.test.js
npm notice 1.6kB   dist/commonjs/map.d.ts
npm notice 783B    dist/commonjs/map.d.ts.map
npm notice 1.0kB   dist/commonjs/map.js
npm notice 49B     dist/commonjs/map.test.d.ts
npm notice 113B    dist/commonjs/map.test.d.ts.map
npm notice 2.6kB   dist/commonjs/map.test.js
npm notice 859B    dist/commonjs/mapKeys.d.ts
npm notice 541B    dist/commonjs/mapKeys.d.ts.map
npm notice 438B    dist/commonjs/mapKeys.js
npm notice 53B     dist/commonjs/mapKeys.test.d.ts
npm notice 121B    dist/commonjs/mapKeys.test.d.ts.map
npm notice 705B    dist/commonjs/mapKeys.test.js
npm notice 762B    dist/commonjs/merge.d.ts
npm notice 334B    dist/commonjs/merge.d.ts.map
npm notice 315B    dist/commonjs/merge.js
npm notice 51B     dist/commonjs/merge.test.d.ts
npm notice 117B    dist/commonjs/merge.test.d.ts.map
npm notice 489B    dist/commonjs/merge.test.js
npm notice 660B    dist/commonjs/mergeAll.d.ts
npm notice 745B    dist/commonjs/mergeAll.d.ts.map
npm notice 497B    dist/commonjs/mergeAll.js
npm notice 54B     dist/commonjs/mergeAll.test.d.ts
npm notice 123B    dist/commonjs/mergeAll.test.d.ts.map
npm notice 309B    dist/commonjs/mergeAll.test.js
npm notice 216B    dist/commonjs/noop.d.ts
npm notice 151B    dist/commonjs/noop.d.ts.map
npm notice 271B    dist/commonjs/noop.js
npm notice 684B    dist/commonjs/objOf.d.ts
npm notice 392B    dist/commonjs/objOf.d.ts.map
npm notice 285B    dist/commonjs/objOf.js
npm notice 51B     dist/commonjs/objOf.test.d.ts
npm notice 117B    dist/commonjs/objOf.test.d.ts.map
npm notice 534B    dist/commonjs/objOf.test.js
npm notice 920B    dist/commonjs/omit.d.ts
npm notice 545B    dist/commonjs/omit.d.ts.map
npm notice 466B    dist/commonjs/omit.js
npm notice 50B     dist/commonjs/omit.test.d.ts
npm notice 115B    dist/commonjs/omit.test.d.ts.map
npm notice 557B    dist/commonjs/omit.test.js
npm notice 455B    dist/commonjs/once.d.ts
npm notice 186B    dist/commonjs/once.d.ts.map
npm notice 659B    dist/commonjs/once.js
npm notice 50B     dist/commonjs/once.test.d.ts
npm notice 115B    dist/commonjs/once.test.d.ts.map
npm notice 415B    dist/commonjs/once.test.js
npm notice 1.7kB   dist/commonjs/pathOr.d.ts
npm notice 1.6kB   dist/commonjs/pathOr.d.ts.map
npm notice 532B    dist/commonjs/pathOr.js
npm notice 52B     dist/commonjs/pathOr.test.d.ts
npm notice 119B    dist/commonjs/pathOr.test.d.ts.map
npm notice 1.5kB   dist/commonjs/pathOr.test.js
npm notice 828B    dist/commonjs/pick.d.ts
npm notice 420B    dist/commonjs/pick.d.ts.map
npm notice 394B    dist/commonjs/pick.js
npm notice 50B     dist/commonjs/pick.test.d.ts
npm notice 115B    dist/commonjs/pick.test.d.ts.map
npm notice 764B    dist/commonjs/pick.test.js
npm notice 1.4kB   dist/commonjs/pipe.d.ts
npm notice 2.1kB   dist/commonjs/pipe.d.ts.map
npm notice 3.0kB   dist/commonjs/pipe.js
npm notice 50B     dist/commonjs/pipe.test.d.ts
npm notice 115B    dist/commonjs/pipe.test.d.ts.map
npm notice 2.9kB   dist/commonjs/pipe.test.js
npm notice 330B    dist/commonjs/prop.d.ts
npm notice 190B    dist/commonjs/prop.d.ts.map
npm notice 388B    dist/commonjs/prop.js
npm notice 50B     dist/commonjs/prop.test.d.ts
npm notice 115B    dist/commonjs/prop.test.d.ts.map
npm notice 273B    dist/commonjs/prop.test.js
npm notice 994B    dist/commonjs/purry.d.ts
npm notice 238B    dist/commonjs/purry.d.ts.map
npm notice 1.5kB   dist/commonjs/purry.js
npm notice 51B     dist/commonjs/purry.test.d.ts
npm notice 117B    dist/commonjs/purry.test.d.ts.map
npm notice 1.0kB   dist/commonjs/purry.test.js
npm notice 333B    dist/commonjs/randomString.d.ts
npm notice 169B    dist/commonjs/randomString.d.ts.map
npm notice 717B    dist/commonjs/randomString.js
npm notice 58B     dist/commonjs/randomString.test.d.ts
npm notice 131B    dist/commonjs/randomString.test.d.ts.map
npm notice 225B    dist/commonjs/randomString.test.js
npm notice 670B    dist/commonjs/range.d.ts
npm notice 281B    dist/commonjs/range.d.ts.map
npm notice 333B    dist/commonjs/range.js
npm notice 51B     dist/commonjs/range.test.d.ts
npm notice 117B    dist/commonjs/range.test.d.ts.map
npm notice 390B    dist/commonjs/range.test.js
npm notice 1.9kB   dist/commonjs/reduce.d.ts
npm notice 950B    dist/commonjs/reduce.d.ts.map
npm notice 634B    dist/commonjs/reduce.js
npm notice 52B     dist/commonjs/reduce.test.d.ts
npm notice 119B    dist/commonjs/reduce.test.d.ts.map
npm notice 1.0kB   dist/commonjs/reduce.test.js
npm notice 1.7kB   dist/commonjs/reject.d.ts
npm notice 771B    dist/commonjs/reject.d.ts.map
npm notice 1.1kB   dist/commonjs/reject.js
npm notice 52B     dist/commonjs/reject.test.d.ts
npm notice 119B    dist/commonjs/reject.test.d.ts.map
npm notice 1.3kB   dist/commonjs/reject.test.js
npm notice 750B    dist/commonjs/set.d.ts
npm notice 411B    dist/commonjs/set.d.ts.map
npm notice 582B    dist/commonjs/set.js
npm notice 49B     dist/commonjs/set.test.d.ts
npm notice 113B    dist/commonjs/set.test.d.ts.map
npm notice 435B    dist/commonjs/set.test.js
npm notice 1.0kB   dist/commonjs/sort.d.ts
npm notice 401B    dist/commonjs/sort.d.ts.map
npm notice 291B    dist/commonjs/sort.js
npm notice 50B     dist/commonjs/sort.test.d.ts
npm notice 115B    dist/commonjs/sort.test.d.ts.map
npm notice 513B    dist/commonjs/sort.test.js
npm notice 913B    dist/commonjs/sortBy.d.ts
npm notice 372B    dist/commonjs/sortBy.d.ts.map
npm notice 412B    dist/commonjs/sortBy.js
npm notice 52B     dist/commonjs/sortBy.test.d.ts
npm notice 119B    dist/commonjs/sortBy.test.d.ts.map
npm notice 618B    dist/commonjs/sortBy.test.js
npm notice 842B    dist/commonjs/splitAt.d.ts
npm notice 370B    dist/commonjs/splitAt.d.ts.map
npm notice 334B    dist/commonjs/splitAt.js
npm notice 53B     dist/commonjs/splitAt.test.d.ts
npm notice 121B    dist/commonjs/splitAt.test.d.ts.map
npm notice 682B    dist/commonjs/splitAt.test.js
npm notice 779B    dist/commonjs/splitWhen.d.ts
npm notice 423B    dist/commonjs/splitWhen.d.ts.map
npm notice 450B    dist/commonjs/splitWhen.js
npm notice 55B     dist/commonjs/splitWhen.test.d.ts
npm notice 125B    dist/commonjs/splitWhen.test.d.ts.map
npm notice 502B    dist/commonjs/splitWhen.test.js
npm notice 930B    dist/commonjs/take.d.ts
npm notice 392B    dist/commonjs/take.d.ts.map
npm notice 984B    dist/commonjs/take.js
npm notice 50B     dist/commonjs/take.test.d.ts
npm notice 115B    dist/commonjs/take.test.d.ts.map
npm notice 412B    dist/commonjs/take.test.js
npm notice 761B    dist/commonjs/takeWhile.d.ts
npm notice 371B    dist/commonjs/takeWhile.d.ts.map
npm notice 468B    dist/commonjs/takeWhile.js
npm notice 55B     dist/commonjs/takeWhile.test.d.ts
npm notice 125B    dist/commonjs/takeWhile.test.d.ts.map
npm notice 559B    dist/commonjs/takeWhile.test.js
npm notice 373B    dist/commonjs/toPairs.d.ts
npm notice 255B    dist/commonjs/toPairs.d.ts.map
npm notice 415B    dist/commonjs/toPairs.js
npm notice 53B     dist/commonjs/toPairs.test.d.ts
npm notice 121B    dist/commonjs/toPairs.test.d.ts.map
npm notice 279B    dist/commonjs/toPairs.test.js
npm notice 713B    dist/commonjs/type.d.ts
npm notice 163B    dist/commonjs/type.d.ts.map
npm notice 980B    dist/commonjs/type.js
npm notice 50B     dist/commonjs/type.test.d.ts
npm notice 115B    dist/commonjs/type.test.d.ts.map
npm notice 1.2kB   dist/commonjs/type.test.js
npm notice 889B    dist/commonjs/uniq.d.ts
npm notice 307B    dist/commonjs/uniq.d.ts.map
npm notice 842B    dist/commonjs/uniq.js
npm notice 50B     dist/commonjs/uniq.test.d.ts
npm notice 115B    dist/commonjs/uniq.test.d.ts.map
npm notice 638B    dist/commonjs/uniq.test.js
npm notice 180B    dist/es/_counter.d.ts
npm notice 146B    dist/es/_counter.d.ts.map
npm notice 284B    dist/es/_counter.js
npm notice 304B    dist/es/_reduceLazy.d.ts
npm notice 482B    dist/es/_reduceLazy.d.ts.map
npm notice 376B    dist/es/_reduceLazy.js
npm notice 123B    dist/es/_toLazyIndexed.d.ts
npm notice 156B    dist/es/_toLazyIndexed.d.ts.map
npm notice 85B     dist/es/_toLazyIndexed.js
npm notice 112B    dist/es/_toSingle.d.ts
npm notice 146B    dist/es/_toSingle.d.ts.map
npm notice 79B     dist/es/_toSingle.js
npm notice 264B    dist/es/_types.d.ts
npm notice 441B    dist/es/_types.d.ts.map
npm notice 0       dist/es/_types.js
npm notice 904B    dist/es/addProp.d.ts
npm notice 481B    dist/es/addProp.d.ts.map
npm notice 496B    dist/es/addProp.js
npm notice 53B     dist/es/addProp.test.d.ts
npm notice 121B    dist/es/addProp.test.d.ts.map
npm notice 431B    dist/es/addProp.test.js
npm notice 1.1kB   dist/es/anyPass.d.ts
npm notice 387B    dist/es/anyPass.d.ts.map
npm notice 192B    dist/es/anyPass.js
npm notice 53B     dist/es/anyPass.test.d.ts
npm notice 121B    dist/es/anyPass.test.d.ts.map
npm notice 566B    dist/es/anyPass.test.js
npm notice 1.0kB   dist/es/chunk.d.ts
npm notice 325B    dist/es/chunk.d.ts.map
npm notice 423B    dist/es/chunk.js
npm notice 51B     dist/es/chunk.test.d.ts
npm notice 117B    dist/es/chunk.test.d.ts.map
npm notice 681B    dist/es/chunk.test.js
npm notice 950B    dist/es/clamp.d.ts
npm notice 398B    dist/es/clamp.d.ts.map
npm notice 373B    dist/es/clamp.js
npm notice 51B     dist/es/clamp.test.d.ts
npm notice 117B    dist/es/clamp.test.d.ts.map
npm notice 284B    dist/es/clamp.test.js
npm notice 404B    dist/es/clone.d.ts
npm notice 155B    dist/es/clone.d.ts.map
npm notice 1.8kB   dist/es/clone.js
npm notice 51B     dist/es/clone.test.d.ts
npm notice 117B    dist/es/clone.test.d.ts.map
npm notice 6.1kB   dist/es/clone.test.js
npm notice 380B    dist/es/compact.d.ts
npm notice 176B    dist/es/compact.d.ts.map
npm notice 380B    dist/es/compact.js
npm notice 53B     dist/es/compact.test.d.ts
npm notice 121B    dist/es/compact.test.d.ts.map
npm notice 330B    dist/es/compact.test.js
npm notice 624B    dist/es/concat.d.ts
npm notice 385B    dist/es/concat.d.ts.map
npm notice 163B    dist/es/concat.js
npm notice 52B     dist/es/concat.test.d.ts
npm notice 119B    dist/es/concat.test.d.ts.map
npm notice 425B    dist/es/concat.test.js
npm notice 1.4kB   dist/es/createPipe.d.ts
npm notice 2.1kB   dist/es/createPipe.d.ts.map
npm notice 275B    dist/es/createPipe.js
npm notice 56B     dist/es/createPipe.test.d.ts
npm notice 127B    dist/es/createPipe.test.d.ts.map
npm notice 351B    dist/es/createPipe.test.js
npm notice 1.1kB   dist/es/difference.d.ts
npm notice 423B    dist/es/difference.d.ts.map
npm notice 782B    dist/es/difference.js
npm notice 56B     dist/es/difference.test.d.ts
npm notice 127B    dist/es/difference.test.d.ts.map
npm notice 836B    dist/es/difference.test.js
npm notice 953B    dist/es/drop.d.ts
npm notice 393B    dist/es/drop.d.ts.map
npm notice 692B    dist/es/drop.js
npm notice 50B     dist/es/drop.test.d.ts
npm notice 115B    dist/es/drop.test.d.ts.map
npm notice 748B    dist/es/drop.test.js
npm notice 713B    dist/es/dropLast.d.ts
npm notice 320B    dist/es/dropLast.d.ts.map
npm notice 205B    dist/es/dropLast.js
npm notice 54B     dist/es/dropLast.test.d.ts
npm notice 123B    dist/es/dropLast.test.d.ts.map
npm notice 162B    dist/es/dropLast.test.js
npm notice 949B    dist/es/equals.d.ts
npm notice 282B    dist/es/equals.d.ts.map
npm notice 1.9kB   dist/es/equals.js
npm notice 52B     dist/es/equals.test.d.ts
npm notice 119B    dist/es/equals.test.d.ts.map
npm notice 12.3kB  dist/es/equals.test.js
npm notice 1.7kB   dist/es/filter.d.ts
npm notice 770B    dist/es/filter.d.ts.map
npm notice 930B    dist/es/filter.js
npm notice 52B     dist/es/filter.test.d.ts
npm notice 119B    dist/es/filter.test.d.ts.map
npm notice 1.1kB   dist/es/filter.test.js
npm notice 1.8kB   dist/es/find.d.ts
npm notice 792B    dist/es/find.d.ts.map
npm notice 943B    dist/es/find.js
npm notice 50B     dist/es/find.test.d.ts
npm notice 115B    dist/es/find.test.d.ts.map
npm notice 1.1kB   dist/es/find.test.js
npm notice 2.1kB   dist/es/findIndex.d.ts
npm notice 779B    dist/es/findIndex.d.ts.map
npm notice 1.2kB   dist/es/findIndex.js
npm notice 55B     dist/es/findIndex.test.d.ts
npm notice 125B    dist/es/findIndex.test.d.ts.map
npm notice 1.2kB   dist/es/findIndex.test.js
npm notice 788B    dist/es/first.d.ts
npm notice 360B    dist/es/first.d.ts.map
npm notice 524B    dist/es/first.js
npm notice 51B     dist/es/first.test.d.ts
npm notice 117B    dist/es/first.test.d.ts.map
npm notice 2.2kB   dist/es/first.test.js
npm notice 1.2kB   dist/es/flatMap.d.ts
npm notice 551B    dist/es/flatMap.d.ts.map
npm notice 798B    dist/es/flatMap.js
npm notice 53B     dist/es/flatMap.test.d.ts
npm notice 121B    dist/es/flatMap.test.d.ts.map
npm notice 1.1kB   dist/es/flatMap.test.js
npm notice 956B    dist/es/flatten.d.ts
npm notice 485B    dist/es/flatten.d.ts.map
npm notice 743B    dist/es/flatten.js
npm notice 53B     dist/es/flatten.test.d.ts
npm notice 121B    dist/es/flatten.test.d.ts.map
npm notice 793B    dist/es/flatten.test.js
npm notice 1.2kB   dist/es/flattenDeep.d.ts
npm notice 799B    dist/es/flattenDeep.d.ts.map
npm notice 1.2kB   dist/es/flattenDeep.js
npm notice 57B     dist/es/flattenDeep.test.d.ts
npm notice 129B    dist/es/flattenDeep.test.d.ts.map
npm notice 815B    dist/es/flattenDeep.test.js
npm notice 1.9kB   dist/es/forEach.d.ts
npm notice 767B    dist/es/forEach.d.ts.map
npm notice 994B    dist/es/forEach.js
npm notice 53B     dist/es/forEach.test.d.ts
npm notice 121B    dist/es/forEach.test.d.ts.map
npm notice 1.8kB   dist/es/forEach.test.js
npm notice 841B    dist/es/groupBy.d.ts
npm notice 771B    dist/es/groupBy.d.ts.map
npm notice 956B    dist/es/groupBy.js
npm notice 53B     dist/es/groupBy.test.d.ts
npm notice 121B    dist/es/groupBy.test.d.ts.map
npm notice 861B    dist/es/groupBy.test.js
npm notice 88B     dist/es/identity.d.ts
npm notice 155B    dist/es/identity.d.ts.map
npm notice 54B     dist/es/identity.js
npm notice 1.4kB   dist/es/index.d.ts
npm notice 1.2kB   dist/es/index.d.ts.map
npm notice 1.4kB   dist/es/index.js
npm notice 1.2kB   dist/es/indexBy.d.ts
npm notice 772B    dist/es/indexBy.d.ts.map
npm notice 554B    dist/es/indexBy.js
npm notice 53B     dist/es/indexBy.test.d.ts
npm notice 121B    dist/es/indexBy.test.d.ts.map
npm notice 856B    dist/es/indexBy.test.js
npm notice 1.0kB   dist/es/intersection.d.ts
npm notice 423B    dist/es/intersection.d.ts.map
npm notice 799B    dist/es/intersection.js
npm notice 58B     dist/es/intersection.test.d.ts
npm notice 131B    dist/es/intersection.test.d.ts.map
npm notice 358B    dist/es/intersection.test.js
npm notice 283B    dist/es/last.d.ts
npm notice 170B    dist/es/last.d.ts.map
npm notice 269B    dist/es/last.js
npm notice 50B     dist/es/last.test.d.ts
npm notice 115B    dist/es/last.test.d.ts.map
npm notice 195B    dist/es/last.test.js
npm notice 1.6kB   dist/es/map.d.ts
npm notice 783B    dist/es/map.d.ts.map
npm notice 860B    dist/es/map.js
npm notice 49B     dist/es/map.test.d.ts
npm notice 113B    dist/es/map.test.d.ts.map
npm notice 2.4kB   dist/es/map.test.js
npm notice 859B    dist/es/mapKeys.d.ts
npm notice 541B    dist/es/mapKeys.d.ts.map
npm notice 341B    dist/es/mapKeys.js
npm notice 53B     dist/es/mapKeys.test.d.ts
npm notice 121B    dist/es/mapKeys.test.d.ts.map
npm notice 599B    dist/es/mapKeys.test.js
npm notice 762B    dist/es/merge.d.ts
npm notice 334B    dist/es/merge.d.ts.map
npm notice 213B    dist/es/merge.js
npm notice 51B     dist/es/merge.test.d.ts
npm notice 117B    dist/es/merge.test.d.ts.map
npm notice 395B    dist/es/merge.test.js
npm notice 660B    dist/es/mergeAll.d.ts
npm notice 745B    dist/es/mergeAll.d.ts.map
npm notice 398B    dist/es/mergeAll.js
npm notice 54B     dist/es/mergeAll.test.d.ts
npm notice 123B    dist/es/mergeAll.test.d.ts.map
npm notice 220B    dist/es/mergeAll.test.js
npm notice 216B    dist/es/noop.d.ts
npm notice 151B    dist/es/noop.d.ts.map
npm notice 197B    dist/es/noop.js
npm notice 684B    dist/es/objOf.d.ts
npm notice 392B    dist/es/objOf.d.ts.map
npm notice 183B    dist/es/objOf.js
npm notice 51B     dist/es/objOf.test.d.ts
npm notice 117B    dist/es/objOf.test.d.ts.map
npm notice 440B    dist/es/objOf.test.js
npm notice 920B    dist/es/omit.d.ts
npm notice 545B    dist/es/omit.d.ts.map
npm notice 366B    dist/es/omit.js
npm notice 50B     dist/es/omit.test.d.ts
npm notice 115B    dist/es/omit.test.d.ts.map
npm notice 457B    dist/es/omit.test.js
npm notice 455B    dist/es/once.d.ts
npm notice 186B    dist/es/once.d.ts.map
npm notice 568B    dist/es/once.js
npm notice 50B     dist/es/once.test.d.ts
npm notice 115B    dist/es/once.test.d.ts.map
npm notice 330B    dist/es/once.test.js
npm notice 1.7kB   dist/es/pathOr.d.ts
npm notice 1.6kB   dist/es/pathOr.d.ts.map
npm notice 428B    dist/es/pathOr.js
npm notice 52B     dist/es/pathOr.test.d.ts
npm notice 119B    dist/es/pathOr.test.d.ts.map
npm notice 1.3kB   dist/es/pathOr.test.js
npm notice 828B    dist/es/pick.d.ts
npm notice 420B    dist/es/pick.d.ts.map
npm notice 294B    dist/es/pick.js
npm notice 50B     dist/es/pick.test.d.ts
npm notice 115B    dist/es/pick.test.d.ts.map
npm notice 650B    dist/es/pick.test.js
npm notice 1.4kB   dist/es/pipe.d.ts
npm notice 2.1kB   dist/es/pipe.d.ts.map
npm notice 2.9kB   dist/es/pipe.js
npm notice 50B     dist/es/pipe.test.d.ts
npm notice 115B    dist/es/pipe.test.d.ts.map
npm notice 2.6kB   dist/es/pipe.test.js
npm notice 330B    dist/es/prop.d.ts
npm notice 190B    dist/es/prop.d.ts.map
npm notice 297B    dist/es/prop.js
npm notice 50B     dist/es/prop.test.d.ts
npm notice 115B    dist/es/prop.test.d.ts.map
npm notice 180B    dist/es/prop.test.js
npm notice 994B    dist/es/purry.d.ts
npm notice 238B    dist/es/purry.d.ts.map
npm notice 1.4kB   dist/es/purry.js
npm notice 51B     dist/es/purry.test.d.ts
npm notice 117B    dist/es/purry.test.d.ts.map
npm notice 921B    dist/es/purry.test.js
npm notice 333B    dist/es/randomString.d.ts
npm notice 169B    dist/es/randomString.d.ts.map
npm notice 601B    dist/es/randomString.js
npm notice 58B     dist/es/randomString.test.d.ts
npm notice 131B    dist/es/randomString.test.d.ts.map
npm notice 132B    dist/es/randomString.test.js
npm notice 670B    dist/es/range.d.ts
npm notice 281B    dist/es/range.d.ts.map
npm notice 231B    dist/es/range.js
npm notice 51B     dist/es/range.test.d.ts
npm notice 117B    dist/es/range.test.d.ts.map
npm notice 296B    dist/es/range.test.js
npm notice 1.9kB   dist/es/reduce.d.ts
npm notice 950B    dist/es/reduce.d.ts.map
npm notice 497B    dist/es/reduce.js
npm notice 52B     dist/es/reduce.test.d.ts
npm notice 119B    dist/es/reduce.test.d.ts.map
npm notice 880B    dist/es/reduce.test.js
npm notice 1.7kB   dist/es/reject.d.ts
npm notice 771B    dist/es/reject.d.ts.map
npm notice 931B    dist/es/reject.js
npm notice 52B     dist/es/reject.test.d.ts
npm notice 119B    dist/es/reject.test.d.ts.map
npm notice 1.1kB   dist/es/reject.test.js
npm notice 750B    dist/es/set.d.ts
npm notice 411B    dist/es/set.d.ts.map
npm notice 484B    dist/es/set.js
npm notice 49B     dist/es/set.test.d.ts
npm notice 113B    dist/es/set.test.d.ts.map
npm notice 337B    dist/es/set.test.js
npm notice 1.0kB   dist/es/sort.d.ts
npm notice 401B    dist/es/sort.d.ts.map
npm notice 191B    dist/es/sort.js
npm notice 50B     dist/es/sort.test.d.ts
npm notice 115B    dist/es/sort.test.d.ts.map
npm notice 413B    dist/es/sort.test.js
npm notice 913B    dist/es/sortBy.d.ts
npm notice 372B    dist/es/sortBy.d.ts.map
npm notice 308B    dist/es/sortBy.js
npm notice 52B     dist/es/sortBy.test.d.ts
npm notice 119B    dist/es/sortBy.test.d.ts.map
npm notice 514B    dist/es/sortBy.test.js
npm notice 842B    dist/es/splitAt.d.ts
npm notice 370B    dist/es/splitAt.d.ts.map
npm notice 228B    dist/es/splitAt.js
npm notice 53B     dist/es/splitAt.test.d.ts
npm notice 121B    dist/es/splitAt.test.d.ts.map
npm notice 564B    dist/es/splitAt.test.js
npm notice 779B    dist/es/splitWhen.d.ts
npm notice 423B    dist/es/splitWhen.d.ts.map
npm notice 329B    dist/es/splitWhen.js
npm notice 55B     dist/es/splitWhen.test.d.ts
npm notice 125B    dist/es/splitWhen.test.d.ts.map
npm notice 400B    dist/es/splitWhen.test.js
npm notice 930B    dist/es/take.d.ts
npm notice 392B    dist/es/take.d.ts.map
npm notice 846B    dist/es/take.js
npm notice 50B     dist/es/take.test.d.ts
npm notice 115B    dist/es/take.test.d.ts.map
npm notice 320B    dist/es/take.test.js
npm notice 761B    dist/es/takeWhile.d.ts
npm notice 371B    dist/es/takeWhile.d.ts.map
npm notice 358B    dist/es/takeWhile.js
npm notice 55B     dist/es/takeWhile.test.d.ts
npm notice 125B    dist/es/takeWhile.test.d.ts.map
npm notice 449B    dist/es/takeWhile.test.js
npm notice 373B    dist/es/toPairs.d.ts
npm notice 255B    dist/es/toPairs.d.ts.map
npm notice 318B    dist/es/toPairs.js
npm notice 53B     dist/es/toPairs.test.d.ts
npm notice 121B    dist/es/toPairs.test.d.ts.map
npm notice 191B    dist/es/toPairs.test.js
npm notice 713B    dist/es/type.d.ts
npm notice 163B    dist/es/type.d.ts.map
npm notice 889B    dist/es/type.js
npm notice 50B     dist/es/type.test.d.ts
npm notice 115B    dist/es/type.test.d.ts.map
npm notice 1.1kB   dist/es/type.test.js
npm notice 889B    dist/es/uniq.d.ts
npm notice 307B    dist/es/uniq.d.ts.map
npm notice 704B    dist/es/uniq.js
npm notice 50B     dist/es/uniq.test.d.ts
npm notice 115B    dist/es/uniq.test.d.ts.map
npm notice 523B    dist/es/uniq.test.js
npm notice 215B    scripts/build.sh
npm notice 436B    scripts/create-index.js
npm notice 3.2kB   scripts/generate.ts
npm notice 191B    scripts/readme.js
npm notice 5.0kB   scripts/tsconfig.json
npm notice 209B    src/_counter.ts
npm notice 527B    src/_reduceLazy.ts
npm notice 122B    src/_toLazyIndexed.ts
npm notice 115B    src/_toSingle.ts
npm notice 212B    src/_types.ts
npm notice 407B    src/addProp.test.ts
npm notice 1.1kB   src/addProp.ts
npm notice 495B    src/anyPass.test.ts
npm notice 1.3kB   src/anyPass.ts
npm notice 604B    src/chunk.test.ts
npm notice 1.4kB   src/chunk.ts
npm notice 263B    src/clamp.test.ts
npm notice 1.3kB   src/clamp.ts
npm notice 5.6kB   src/clone.test.ts
npm notice 1.7kB   src/clone.ts
npm notice 325B    src/compact.test.ts
npm notice 366B    src/compact.ts
npm notice 401B    src/concat.test.ts
npm notice 749B    src/concat.ts
npm notice 297B    src/createPipe.test.ts
npm notice 1.6kB   src/createPipe.ts
npm notice 796B    src/difference.test.ts
npm notice 1.4kB   src/difference.ts
npm notice 739B    src/drop.test.ts
npm notice 1.2kB   src/drop.ts
npm notice 155B    src/dropLast.test.ts
npm notice 875B    src/dropLast.ts
npm notice 9.5kB   src/equals.test.ts
npm notice 2.6kB   src/equals.ts
npm notice 996B    src/filter.test.ts
npm notice 2.2kB   src/filter.ts
npm notice 1.0kB   src/find.test.ts
npm notice 2.2kB   src/find.ts
npm notice 1.0kB   src/findIndex.test.ts
npm notice 2.4kB   src/findIndex.ts
npm notice 2.1kB   src/first.test.ts
npm notice 942B    src/first.ts
npm notice 962B    src/flatMap.test.ts
npm notice 1.5kB   src/flatMap.ts
npm notice 762B    src/flatten.test.ts
npm notice 1.2kB   src/flatten.ts
npm notice 784B    src/flattenDeep.test.ts
npm notice 1.9kB   src/flattenDeep.ts
npm notice 1.7kB   src/forEach.test.ts
npm notice 2.4kB   src/forEach.ts
npm notice 788B    src/groupBy.test.ts
npm notice 1.7kB   src/groupBy.ts
npm notice 58B     src/identity.ts
npm notice 1.4kB   src/index.ts
npm notice 785B    src/indexBy.test.ts
npm notice 1.7kB   src/indexBy.ts
npm notice 320B    src/intersection.test.ts
npm notice 1.4kB   src/intersection.ts
npm notice 181B    src/last.test.ts
npm notice 275B    src/last.ts
npm notice 2.2kB   src/map.test.ts
npm notice 2.0kB   src/map.ts
npm notice 557B    src/mapKeys.test.ts
npm notice 1.2kB   src/mapKeys.ts
npm notice 355B    src/merge.test.ts
npm notice 934B    src/merge.ts
npm notice 195B    src/mergeAll.test.ts
npm notice 689B    src/mergeAll.ts
npm notice 188B    src/noop.ts
npm notice 390B    src/objOf.test.ts
npm notice 799B    src/objOf.ts
npm notice 433B    src/omit.test.ts
npm notice 1.3kB   src/omit.ts
npm notice 317B    src/once.test.ts
npm notice 554B    src/once.ts
npm notice 1.4kB   src/pathOr.test.ts
npm notice 2.1kB   src/pathOr.ts
npm notice 608B    src/pick.test.ts
npm notice 1.1kB   src/pick.ts
npm notice 2.5kB   src/pipe.test.ts
npm notice 4.0kB   src/pipe.ts
npm notice 185B    src/prop.test.ts
npm notice 305B    src/prop.ts
npm notice 534B    src/purry.test.ts
npm notice 1.3kB   src/purry.ts
npm notice 125B    src/randomString.test.ts
npm notice 567B    src/randomString.ts
npm notice 258B    src/range.test.ts
npm notice 868B    src/range.ts
npm notice 861B    src/reduce.test.ts
npm notice 2.3kB   src/reduce.ts
npm notice 995B    src/reject.test.ts
npm notice 2.2kB   src/reject.ts
npm notice 335B    src/set.test.ts
npm notice 898B    src/set.ts
npm notice 375B    src/sort.test.ts
npm notice 1.2kB   src/sort.ts
npm notice 477B    src/sortBy.test.ts
npm notice 1.2kB   src/sortBy.ts
npm notice 500B    src/splitAt.test.ts
npm notice 1.0kB   src/splitAt.ts
npm notice 326B    src/splitWhen.test.ts
npm notice 1.1kB   src/splitWhen.ts
npm notice 282B    src/take.test.ts
npm notice 1.3kB   src/take.ts
npm notice 407B    src/takeWhile.test.ts
npm notice 1.0kB   src/takeWhile.ts
npm notice 184B    src/toPairs.test.ts
npm notice 359B    src/toPairs.ts
npm notice 1.0kB   src/type.test.ts
npm notice 872B    src/type.ts
npm notice 519B    src/uniq.test.ts
npm notice 1.2kB   src/uniq.ts
npm notice === Tarball Details ===
npm notice name:          remeda
npm notice version:       0.0.6
npm notice filename:      remeda-0.0.6.tgz
npm notice package size:  141.4 kB
npm notice unpacked size: 629.5 kB
npm notice shasum:        7a05ac30fa6d854f1e4af5f38910e257584ebc08
npm notice integrity:     sha512-IF/6qgGPgpIKJ[...]n9nZtPD9THw3w==
npm notice total files:   767
npm notice
remeda-0.0.6.tgz

Feature Request: mapValues

As per mapKeys but iterating over the values of the object.

R.mapValues({ a: 1, b: 2 }, (key, value) => key + value) // => { a: a1, b: b2 }

pathOr does not work with optional properties

Just found out this lib and it seems sweet!

I tried to playaround with the pathOr function but it looks like it does not work if the object properties are optional

type PartialThing = {
    foo?: {
        bar?: {
            num?: number;
            char?: string;
        };
    };
};

const thing: PartialThing = {};

const val = R.pathOr(thing, ["foo", "bar", "num"], 3);

kuva

But I found out that it is possible to workaround it by casting the data to be deeply required:

type DeepRequired<T> = {
    [P in keyof T]-?: T[P] extends Array<infer U>
        ? Array<DeepRequired<U>>
        : T[P] extends Array<infer U>
            ? Array<DeepRequired<U>>
            : DeepRequired<T[P]>
};


// Type checks!
const val = R.pathOr(
    thing as DeepRequired<typeof thing>,
    ["foo", "bar", "num"],
    3,
);

I wonder if it would be possible to bake this into the pathOr types? Thanks.

Decide on the philosophy and plans for missing Remeda equivalents of Lodash and Ramda functions

Thought I'd create a single issue where the community can discuss this issue before we go too far down one path or another.

Discussion so far has been split across a few issues and PRs: #37, #29, #53, #10

It would be good to identify:

  1. What Lodash and Ramda functions to add eventually + possibly what to do in the meantime
  2. What functions NEVER to add + why not + what to do instead
  3. What are the rules / guidelines for deciding which functions fit into each category?

Propose that whatever is agreed be documented in mapping.md

Sliding window function

I find myself needing this often:

function toWindows(inputArray, size) {
  return Array.from(
    {length: inputArray.length - (size - 1)}, //get the appropriate length
    (_, index) => inputArray.slice(index, index+size) //create the windows
  )
}

What does the community think about adding this functionality in?

Add "zipObj" function

Are we interested in zipObj(keys, values) function? I use it quite frequently and would like to have it in remeda.

If so, I can send an PR.

the return type of first is unsafe

the signature is

export function first<T>(array: T[]): T;

but as the example say

R.first([1, 2, 3]) // => 1
R.first([]) // => undefined

it should be T | undefined?

Support "ReadonlyArray" type in function arguments

I type arrays as readonly quite often and currently I have to make the array type writable when I use remeda functionality.

Code example:

const props = ["prop1", "prop2"] as const;
// or similar:
// const props: ReadonlyArray<string> = ["prop1", "prop2"];
// const getProps = <T extends string>(props: readonly T[]) => props;

pick(someObject, props); // TS2345 compilation error
pick(someObject, [...props]); // works

It's, in general, a good thing to make all the function input args type-level/fake readonly/immutable since it reduces a chance you accidentally mutate the input args internally in the function implementation.

flatMap should not accept functions that don't return an array

The following tests is succeeding.

 const actual = flatMap([1, 2] as const, x => x * 2);
 expect(actual).toEqual([2, 4])

In a typed context, I woudn't expect it to even typecheck.

I see that the accepted function type is fn: (input: T) => K | K[]
Why not fn: (input: T) => K[]

Maybe there is a good reason I fail to see ?

How to type pipe reduce

In the code below Typescript is complaining that the acc and doc arguments are typed any even though I've typed the Map passed into the reduce.

Lodash can infer the type like this, and I want to switch to Remeda because it should be an improvement, so I don't know what I'm doing wrong here. Manually typing these function arguments doesn't seem like the right thing to do.

const list: GuidelineListing[] = R.pipe(
    guidelines,
    R.reduce((acc, doc) => {
      const { number, createdAt } = doc.data;

      if (acc.has(number) && acc.get(number)!.data.createdAt > createdAt) {
        /**
         * The guideline is already in the map and is of a later version than
         * the doc. So we can just return the map as-is.
         */
        return acc;
      } else {
        return acc.set(number, doc);
      }
    }, new Map<number, Document<Guideline>>()),
    ...
)

groupBy hidden bug

Currently, the group by function has hidden BUG.

interface User {
     prop1: string
}
const data: User[] = [{ prop1: "a" }, { prop1: "b" } ]
R.pipe(
    data,
    R.groupBy((c)=>c.prop1)
) //  { a: [{ prop1: "a" }], b: [ {prop1: 'b'} ] }

// Change in code 
interface User {
     prop1: string[]
}
R.pipe(
    data,
    R.groupBy((c)=>c.prop1)
) //  { "[object Object]": [{ prop1: "a" }, {prop1: 'b'}] }

// Types not complaining no runtime error.

Expecting: Typescript should complain that this is not a valid input

uniqBy is not exported properly

import { concat, uniq, sortBy, identity, uniqBy } from "remeda";

error TS2724: Module '"../../../node_modules/remeda/dist/commonjs"' has no exported member 'uniqBy'. Did you mean 'uniq'?

However all other functions are imported properly
Using ts 3.8.3

Stable version and changelog?

This lib has not released a minor version yet, so we have the risk of suffering a breaking change. Do you have a plan to release a minor/major version and record changes via changelog? changesets is a great tool for this.

Make a documentation page for Ramda users

Awesome package!

I really like how it works but it is hard for me to adopt as functions are named not the same way as in ramda. A page/table that shows what are the remeda equivalents of ramda functions (maybe with usage examples) would help a lot

Am I doing something wrong when using Object.values?

Currently there is no values remeda function, so instead I use Object.values when I need to get the values of an object without its keys, however this causes the resulting values from Object.values to be of type any[].
If I pipe this, the entire chain of excellent inferred typing that remeda does is thrown out of the window.
Here is an example of what I am taking about:
Screen Shot 2021-07-18 at 12 30 04

I have tried using (o): (A | B | C)[] => Object.values(o) but it ends up being just a confusing mess going down the chain.

Am I doing something wrong or should I start a feature request for a values function?

Useful information:

  • I use target: "es5" in tsconfig and cannot change it since my target are web browsers.

Roadmap / contribution

#10 already raises a similar question, but is closed now. So I think this question is still open for potential contributors: what's next?
I like this project and for it to be a true alternative to lodash or ramda I think it should focus on ease of migration (from one of the named libraries) and provide alternatives to all the main utils.
This leads to another question: what are the main functions?
So just to get this conversation going, here is what I think is missing in remeda:

isNil, defaultTo, is, isEmpty, uniqBy, path, prop, propOr, propEq, nth, length, includes, has, assoc, assocPath, tail, init, debounce, throttle

If this lists seems reasonable I would pick one of these from time to time and mark them as in progress (by creating an issue or something) and then create a pull request when done.

What I therefore also would find helpful, would be a short introduction about how to implement lazyness, as this is not yet completely clear to me.

Incomplete mapping.md

For people migrating from Lodash or Ramda it would be useful if the mapping.md provides a complete list. Or is that not the goal of this file?

For example, I'm not sure how to replace the Lodash times utility...

Feature Request: setPath

It would be awesome to have an option to set values deeply nested with a path value. Ideally, something that supports lodash's format would be ideal, although I realise that might be complex to implement.

var object = { 'a': [{ 'b': { 'c': 3 } }] };
 
var object2 = R.setPath(object, 'a[0].b.c', 4);

console.log(object2.a[0].b.c);
// => 4

If it's easier, or to keep in line with R.pathOr it might make sense to use an array for path instead.

var object3 = R.set(object, ['x', '0', 'y', 'z'], 5);

console.log(object3.x[0].y.z);
// => 5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.