@unction/partition
TypeScript icon, indicating that this package has built-in type declarations

9.13.0 • Public • Published

@unction/partition

Tests Stability Dependencies

PredicateFunctionType => Array | Set | Record<string | number | symbol, B> | Map<B, A> | string => [Array | Set | Record<string | number | symbol, B> | Map<B, A> | string, Array | Set | Record<string | number | symbol, B> | Map<B, A> | string]

This function takes an enumerable and returns an Array of two enumerables. The first of which contains elements which satisfy the predicate, the second of which contains element which do not.

partition(isOdd)([1,2,3,4]) // [[1,3],[2,4]]

Readme

Keywords

Package Sidebar

Install

npm i @unction/partition

Weekly Downloads

0

Version

9.13.0

License

SEE LICENSE IN LICENSE

Unpacked Size

24.9 kB

Total Files

7

Last publish

Collaborators

  • krainboltgreene