Share your code. Components are building blocks, you are the architect.

utils/partition
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
Build: fail
BuildFail
Build Status: fail
Takes a predicate and a list or other `Filterable` object and returns the

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/partition in your project
npm i @bit/bit.ramda.utils.partition
Copied

partition (pred:Function, filterable:Array) : Array

Takes a predicate and a list or other Filterable object and returns the pair of filterable objects of the same type of elements which do and do not satisfy, the predicate, respectively. Filterable objects include plain objects or any object that has a filter method such as Array.

Example

R.partition(R.contains('s'), ['sss', 'ttt', 'foo', 'bars']);
     // => [ [ 'sss', 'bars' ],  [ 'ttt', 'foo' ] ]

     R.partition(R.contains('s'), { a: 'sss', b: 'ttt', foo: 'bars' });
     // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' }  ]

Arguments

pred: Function

A predicate to determine which side the element belongs to.

filterable: Array

the list (or other filterable) to partition.

Returns

Array

An array, containing first the subset of elements that satisfy the predicate, and second the subset of elements that do not satisfy.