rubico 2.7.6 → 2.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -16
- package/dist/Transducer.es.js +2 -2
- package/dist/Transducer.es.min.js +2 -2
- package/dist/Transducer.js +2 -2
- package/dist/Transducer.min.js +2 -2
- package/dist/Transducer.mjs +2 -2
- package/dist/__.es.js +2 -2
- package/dist/__.es.min.js +2 -2
- package/dist/__.js +2 -2
- package/dist/__.min.js +2 -2
- package/dist/__.mjs +2 -2
- package/dist/all.es.js +2 -2
- package/dist/all.es.min.js +2 -2
- package/dist/all.js +2 -2
- package/dist/all.min.js +2 -2
- package/dist/all.mjs +2 -2
- package/dist/always.es.js +2 -2
- package/dist/always.es.min.js +2 -2
- package/dist/always.js +2 -2
- package/dist/always.min.js +2 -2
- package/dist/always.mjs +2 -2
- package/dist/and.es.js +2 -2
- package/dist/and.es.min.js +2 -2
- package/dist/and.js +2 -2
- package/dist/and.min.js +2 -2
- package/dist/and.mjs +2 -2
- package/dist/assign.es.js +2 -2
- package/dist/assign.es.min.js +2 -2
- package/dist/assign.js +2 -2
- package/dist/assign.min.js +2 -2
- package/dist/assign.mjs +2 -2
- package/dist/compose.es.js +2 -2
- package/dist/compose.es.min.js +2 -2
- package/dist/compose.js +2 -2
- package/dist/compose.min.js +2 -2
- package/dist/compose.mjs +2 -2
- package/dist/curry.es.js +2 -2
- package/dist/curry.es.min.js +2 -2
- package/dist/curry.js +2 -2
- package/dist/curry.min.js +2 -2
- package/dist/curry.mjs +2 -2
- package/dist/eq.es.js +2 -2
- package/dist/eq.es.min.js +2 -2
- package/dist/eq.js +2 -2
- package/dist/eq.min.js +2 -2
- package/dist/eq.mjs +2 -2
- package/dist/every.es.js +2 -2
- package/dist/every.es.min.js +2 -2
- package/dist/every.js +2 -2
- package/dist/every.min.js +2 -2
- package/dist/every.mjs +2 -2
- package/dist/filter.es.js +2 -2
- package/dist/filter.es.min.js +2 -2
- package/dist/filter.js +2 -2
- package/dist/filter.min.js +2 -2
- package/dist/filter.mjs +2 -2
- package/dist/flatMap.es.js +2 -2
- package/dist/flatMap.es.min.js +2 -2
- package/dist/flatMap.js +2 -2
- package/dist/flatMap.min.js +2 -2
- package/dist/flatMap.mjs +2 -2
- package/dist/forEach.es.js +2 -2
- package/dist/forEach.es.min.js +2 -2
- package/dist/forEach.js +2 -2
- package/dist/forEach.min.js +2 -2
- package/dist/forEach.mjs +2 -2
- package/dist/get.es.js +2 -2
- package/dist/get.es.min.js +2 -2
- package/dist/get.js +2 -2
- package/dist/get.min.js +2 -2
- package/dist/get.mjs +2 -2
- package/dist/gt.es.js +2 -2
- package/dist/gt.es.min.js +2 -2
- package/dist/gt.js +2 -2
- package/dist/gt.min.js +2 -2
- package/dist/gt.mjs +2 -2
- package/dist/gte.es.js +2 -2
- package/dist/gte.es.min.js +2 -2
- package/dist/gte.js +2 -2
- package/dist/gte.min.js +2 -2
- package/dist/gte.mjs +2 -2
- package/dist/lt.es.js +2 -2
- package/dist/lt.es.min.js +2 -2
- package/dist/lt.js +2 -2
- package/dist/lt.min.js +2 -2
- package/dist/lt.mjs +2 -2
- package/dist/lte.es.js +2 -2
- package/dist/lte.es.min.js +2 -2
- package/dist/lte.js +2 -2
- package/dist/lte.min.js +2 -2
- package/dist/lte.mjs +2 -2
- package/dist/map.es.js +2 -2
- package/dist/map.es.min.js +2 -2
- package/dist/map.js +2 -2
- package/dist/map.min.js +2 -2
- package/dist/map.mjs +2 -2
- package/dist/not.es.js +2 -2
- package/dist/not.es.min.js +2 -2
- package/dist/not.js +2 -2
- package/dist/not.min.js +2 -2
- package/dist/not.mjs +2 -2
- package/dist/omit.es.js +2 -2
- package/dist/omit.es.min.js +2 -2
- package/dist/omit.js +2 -2
- package/dist/omit.min.js +2 -2
- package/dist/omit.mjs +2 -2
- package/dist/or.es.js +2 -2
- package/dist/or.es.min.js +2 -2
- package/dist/or.js +2 -2
- package/dist/or.min.js +2 -2
- package/dist/or.mjs +2 -2
- package/dist/pick.es.js +2 -2
- package/dist/pick.es.min.js +2 -2
- package/dist/pick.js +2 -2
- package/dist/pick.min.js +2 -2
- package/dist/pick.mjs +2 -2
- package/dist/pipe.es.js +2 -2
- package/dist/pipe.es.min.js +2 -2
- package/dist/pipe.js +2 -2
- package/dist/pipe.min.js +2 -2
- package/dist/pipe.mjs +2 -2
- package/dist/reduce.es.js +2 -2
- package/dist/reduce.es.min.js +2 -2
- package/dist/reduce.js +2 -2
- package/dist/reduce.min.js +2 -2
- package/dist/reduce.mjs +2 -2
- package/dist/rubico.es.js +2 -2
- package/dist/rubico.es.min.js +2 -2
- package/dist/rubico.global.js +2 -2
- package/dist/rubico.global.min.js +2 -2
- package/dist/rubico.js +2 -2
- package/dist/rubico.min.js +2 -2
- package/dist/rubico.mjs +2 -2
- package/dist/set.es.js +2 -2
- package/dist/set.es.min.js +2 -2
- package/dist/set.js +2 -2
- package/dist/set.min.js +2 -2
- package/dist/set.mjs +2 -2
- package/dist/some.es.js +2 -2
- package/dist/some.es.min.js +2 -2
- package/dist/some.js +2 -2
- package/dist/some.min.js +2 -2
- package/dist/some.mjs +2 -2
- package/dist/switchCase.es.js +2 -2
- package/dist/switchCase.es.min.js +2 -2
- package/dist/switchCase.js +2 -2
- package/dist/switchCase.min.js +2 -2
- package/dist/switchCase.mjs +2 -2
- package/dist/tap.es.js +2 -2
- package/dist/tap.es.min.js +2 -2
- package/dist/tap.js +2 -2
- package/dist/tap.min.js +2 -2
- package/dist/tap.mjs +2 -2
- package/dist/thunkify.es.js +2 -2
- package/dist/thunkify.es.min.js +2 -2
- package/dist/thunkify.js +2 -2
- package/dist/thunkify.min.js +2 -2
- package/dist/thunkify.mjs +2 -2
- package/dist/transform.es.js +2 -2
- package/dist/transform.es.min.js +2 -2
- package/dist/transform.js +2 -2
- package/dist/transform.min.js +2 -2
- package/dist/transform.mjs +2 -2
- package/dist/tryCatch.es.js +2 -2
- package/dist/tryCatch.es.min.js +2 -2
- package/dist/tryCatch.js +2 -2
- package/dist/tryCatch.min.js +2 -2
- package/dist/tryCatch.mjs +2 -2
- package/dist/x/append.es.js +2 -2
- package/dist/x/append.es.min.js +2 -2
- package/dist/x/append.js +2 -2
- package/dist/x/append.min.js +2 -2
- package/dist/x/append.mjs +2 -2
- package/dist/x/callProp.es.js +2 -2
- package/dist/x/callProp.es.min.js +2 -2
- package/dist/x/callProp.js +2 -2
- package/dist/x/callProp.min.js +2 -2
- package/dist/x/callProp.mjs +2 -2
- package/dist/x/defaultsDeep.es.js +2 -2
- package/dist/x/defaultsDeep.es.min.js +2 -2
- package/dist/x/defaultsDeep.js +2 -2
- package/dist/x/defaultsDeep.min.js +2 -2
- package/dist/x/defaultsDeep.mjs +2 -2
- package/dist/x/differenceWith.es.js +2 -2
- package/dist/x/differenceWith.es.min.js +2 -2
- package/dist/x/differenceWith.js +2 -2
- package/dist/x/differenceWith.min.js +2 -2
- package/dist/x/differenceWith.mjs +2 -2
- package/dist/x/filterOut.es.js +2 -2
- package/dist/x/filterOut.es.min.js +2 -2
- package/dist/x/filterOut.js +2 -2
- package/dist/x/filterOut.min.js +2 -2
- package/dist/x/filterOut.mjs +2 -2
- package/dist/x/find.es.js +2 -2
- package/dist/x/find.es.min.js +2 -2
- package/dist/x/find.js +2 -2
- package/dist/x/find.min.js +2 -2
- package/dist/x/find.mjs +2 -2
- package/dist/x/findIndex.es.js +2 -2
- package/dist/x/findIndex.es.min.js +2 -2
- package/dist/x/findIndex.js +2 -2
- package/dist/x/findIndex.min.js +2 -2
- package/dist/x/findIndex.mjs +2 -2
- package/dist/x/first.es.js +2 -2
- package/dist/x/first.es.min.js +2 -2
- package/dist/x/first.js +2 -2
- package/dist/x/first.min.js +2 -2
- package/dist/x/first.mjs +2 -2
- package/dist/x/flatten.es.js +2 -2
- package/dist/x/flatten.es.min.js +2 -2
- package/dist/x/flatten.js +2 -2
- package/dist/x/flatten.min.js +2 -2
- package/dist/x/flatten.mjs +2 -2
- package/dist/x/groupBy.es.js +2 -2
- package/dist/x/groupBy.es.min.js +2 -2
- package/dist/x/groupBy.js +2 -2
- package/dist/x/groupBy.min.js +2 -2
- package/dist/x/groupBy.mjs +2 -2
- package/dist/x/has.es.js +2 -2
- package/dist/x/has.es.min.js +2 -2
- package/dist/x/has.js +2 -2
- package/dist/x/has.min.js +2 -2
- package/dist/x/has.mjs +2 -2
- package/dist/x/identity.es.js +2 -2
- package/dist/x/identity.es.min.js +2 -2
- package/dist/x/identity.js +2 -2
- package/dist/x/identity.min.js +2 -2
- package/dist/x/identity.mjs +2 -2
- package/dist/x/includes.es.js +2 -2
- package/dist/x/includes.es.min.js +2 -2
- package/dist/x/includes.js +2 -2
- package/dist/x/includes.min.js +2 -2
- package/dist/x/includes.mjs +2 -2
- package/dist/x/isDeepEqual.es.js +2 -2
- package/dist/x/isDeepEqual.es.min.js +2 -2
- package/dist/x/isDeepEqual.js +2 -2
- package/dist/x/isDeepEqual.min.js +2 -2
- package/dist/x/isDeepEqual.mjs +2 -2
- package/dist/x/isEmpty.es.js +2 -2
- package/dist/x/isEmpty.es.min.js +2 -2
- package/dist/x/isEmpty.js +2 -2
- package/dist/x/isEmpty.min.js +2 -2
- package/dist/x/isEmpty.mjs +2 -2
- package/dist/x/isEqual.es.js +2 -2
- package/dist/x/isEqual.es.min.js +2 -2
- package/dist/x/isEqual.js +2 -2
- package/dist/x/isEqual.min.js +2 -2
- package/dist/x/isEqual.mjs +2 -2
- package/dist/x/isFunction.es.js +2 -2
- package/dist/x/isFunction.es.min.js +2 -2
- package/dist/x/isFunction.js +2 -2
- package/dist/x/isFunction.min.js +2 -2
- package/dist/x/isFunction.mjs +2 -2
- package/dist/x/isIn.es.js +2 -2
- package/dist/x/isIn.es.min.js +2 -2
- package/dist/x/isIn.js +2 -2
- package/dist/x/isIn.min.js +2 -2
- package/dist/x/isIn.mjs +2 -2
- package/dist/x/isObject.es.js +2 -2
- package/dist/x/isObject.es.min.js +2 -2
- package/dist/x/isObject.js +2 -2
- package/dist/x/isObject.min.js +2 -2
- package/dist/x/isObject.mjs +2 -2
- package/dist/x/isString.es.js +2 -2
- package/dist/x/isString.es.min.js +2 -2
- package/dist/x/isString.js +2 -2
- package/dist/x/isString.min.js +2 -2
- package/dist/x/isString.mjs +2 -2
- package/dist/x/keys.es.js +2 -2
- package/dist/x/keys.es.min.js +2 -2
- package/dist/x/keys.js +2 -2
- package/dist/x/keys.min.js +2 -2
- package/dist/x/keys.mjs +2 -2
- package/dist/x/last.es.js +2 -2
- package/dist/x/last.es.min.js +2 -2
- package/dist/x/last.js +2 -2
- package/dist/x/last.min.js +2 -2
- package/dist/x/last.mjs +2 -2
- package/dist/x/maxBy.es.js +2 -2
- package/dist/x/maxBy.es.min.js +2 -2
- package/dist/x/maxBy.js +2 -2
- package/dist/x/maxBy.min.js +2 -2
- package/dist/x/maxBy.mjs +2 -2
- package/dist/x/noop.es.js +2 -2
- package/dist/x/noop.es.min.js +2 -2
- package/dist/x/noop.js +2 -2
- package/dist/x/noop.min.js +2 -2
- package/dist/x/noop.mjs +2 -2
- package/dist/x/pluck.es.js +2 -2
- package/dist/x/pluck.es.min.js +2 -2
- package/dist/x/pluck.js +2 -2
- package/dist/x/pluck.min.js +2 -2
- package/dist/x/pluck.mjs +2 -2
- package/dist/x/prepend.es.js +2 -2
- package/dist/x/prepend.es.min.js +2 -2
- package/dist/x/prepend.js +2 -2
- package/dist/x/prepend.min.js +2 -2
- package/dist/x/prepend.mjs +2 -2
- package/dist/x/size.es.js +2 -2
- package/dist/x/size.es.min.js +2 -2
- package/dist/x/size.js +2 -2
- package/dist/x/size.min.js +2 -2
- package/dist/x/size.mjs +2 -2
- package/dist/x/trace.es.js +2 -2
- package/dist/x/trace.es.min.js +2 -2
- package/dist/x/trace.js +2 -2
- package/dist/x/trace.min.js +2 -2
- package/dist/x/trace.mjs +2 -2
- package/dist/x/unionWith.es.js +2 -2
- package/dist/x/unionWith.es.min.js +2 -2
- package/dist/x/unionWith.js +2 -2
- package/dist/x/unionWith.min.js +2 -2
- package/dist/x/unionWith.mjs +2 -2
- package/dist/x/uniq.es.js +2 -2
- package/dist/x/uniq.es.min.js +2 -2
- package/dist/x/uniq.js +2 -2
- package/dist/x/uniq.min.js +2 -2
- package/dist/x/uniq.mjs +2 -2
- package/dist/x/unless.es.js +2 -2
- package/dist/x/unless.es.min.js +2 -2
- package/dist/x/unless.js +2 -2
- package/dist/x/unless.min.js +2 -2
- package/dist/x/unless.mjs +2 -2
- package/dist/x/values.es.js +2 -2
- package/dist/x/values.es.min.js +2 -2
- package/dist/x/values.js +2 -2
- package/dist/x/values.min.js +2 -2
- package/dist/x/values.mjs +2 -2
- package/dist/x/when.es.js +2 -2
- package/dist/x/when.es.min.js +2 -2
- package/dist/x/when.js +2 -2
- package/dist/x/when.min.js +2 -2
- package/dist/x/when.mjs +2 -2
- package/es.js +2 -2
- package/flatMap.js +1 -1
- package/index.js +2 -2
- package/package.json +3 -10
- package/x/append.d.ts +0 -38
- package/x/callProp.d.ts +0 -20
- package/x/defaultsDeep.d.ts +0 -42
- package/x/differenceWith.d.ts +0 -25
- package/x/filterOut.d.ts +0 -39
- package/x/find.d.ts +0 -34
- package/x/findIndex.d.ts +0 -25
- package/x/first.d.ts +0 -23
- package/x/flatten.d.ts +0 -57
- package/x/groupBy.d.ts +0 -50
- package/x/has.d.ts +0 -25
- package/x/heapUsedInLoop.d.ts +0 -53
- package/x/identity.d.ts +0 -21
- package/x/includes.d.ts +0 -25
- package/x/index.d.ts +0 -34
- package/x/is.d.ts +0 -2
- package/x/isDeepEqual.d.ts +0 -42
- package/x/isEmpty.d.ts +0 -24
- package/x/isEqual.d.ts +0 -2
- package/x/isFunction.d.ts +0 -23
- package/x/isIn.d.ts +0 -61
- package/x/isObject.d.ts +0 -2
- package/x/isString.benchmarks.d.ts +0 -1
- package/x/isString.d.ts +0 -21
- package/x/keys.d.ts +0 -23
- package/x/last.d.ts +0 -22
- package/x/maxBy.d.ts +0 -41
- package/x/noop.d.ts +0 -21
- package/x/pluck.d.ts +0 -35
- package/x/prepend.d.ts +0 -38
- package/x/size.d.ts +0 -21
- package/x/test.d.ts +0 -1
- package/x/timeInLoop.d.ts +0 -21
- package/x/trace.d.ts +0 -30
- package/x/tracef.d.ts +0 -7
- package/x/unionWith.d.ts +0 -31
- package/x/uniq.d.ts +0 -24
- package/x/unless.d.ts +0 -28
- package/x/values.d.ts +0 -23
- package/x/when.d.ts +0 -28
package/x/find.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export = find;
|
|
2
|
-
/**
|
|
3
|
-
* @name find
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* Foldable<T> = Iterable<T>|AsyncIterable<T>|{ reduce: (any, T)=>any }|Object<T>
|
|
8
|
-
*
|
|
9
|
-
* var T any,
|
|
10
|
-
* predicate T=>Promise|boolean,
|
|
11
|
-
* foldable Foldable<T>,
|
|
12
|
-
* result Promise|T|undefined
|
|
13
|
-
*
|
|
14
|
-
* find(predicate)(foldable) -> result
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @description
|
|
18
|
-
* Get the first element in a foldable collection that matches a predicate.
|
|
19
|
-
*
|
|
20
|
-
* ```javascript [playground]
|
|
21
|
-
* import find from 'https://unpkg.com/rubico/dist/x/find.es.js'
|
|
22
|
-
*
|
|
23
|
-
* const users = [
|
|
24
|
-
* { name: 'John', age: 16 },
|
|
25
|
-
* { name: 'Jill', age: 32 },
|
|
26
|
-
* { name: 'John', age: 51 },
|
|
27
|
-
* ]
|
|
28
|
-
*
|
|
29
|
-
* console.log(
|
|
30
|
-
* find(user => user.age > 50)(users),
|
|
31
|
-
* ) // { name: 'John', age: 51 }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
declare function find(predicate: any): (value: any) => any;
|
package/x/findIndex.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export = findIndex;
|
|
2
|
-
/**
|
|
3
|
-
* @name findIndex
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* findIndex(predicate function)(array Array) -> index Promise|number
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Returns the index of the first element in an array that satisfies the predicate. Returns -1 if no element satisfies the predicate.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import findIndex from 'https://unpkg.com/rubico/dist/x/findIndex.es.js'
|
|
15
|
-
*
|
|
16
|
-
* const oddNumberIndex = findIndex(function isOdd(number) {
|
|
17
|
-
* return number % 2 == 1
|
|
18
|
-
* })([2, 3, 5])
|
|
19
|
-
*
|
|
20
|
-
* console.log(oddNumberIndex) // 1
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @since 1.6.26
|
|
24
|
-
*/
|
|
25
|
-
declare function findIndex(predicate: any): (array: any) => any;
|
package/x/first.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export = first;
|
|
2
|
-
/**
|
|
3
|
-
* @name first
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* var value Array|string
|
|
8
|
-
*
|
|
9
|
-
* first(value) -> any
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
* @description
|
|
13
|
-
* Get the first element of a collection
|
|
14
|
-
*
|
|
15
|
-
* ```javascript [playground]
|
|
16
|
-
* import first from 'https://unpkg.com/rubico/dist/x/first.es.js'
|
|
17
|
-
*
|
|
18
|
-
* console.log(first([1, 2, 3])) // 1
|
|
19
|
-
* console.log(first('abc')) // 'a'
|
|
20
|
-
* console.log(first([])) // undefined
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
declare function first(value: any): any;
|
package/x/flatten.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export = flatten;
|
|
2
|
-
/**
|
|
3
|
-
* @name flatten
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* Stream<T> = { read: ()=>T, write: T=>() }
|
|
8
|
-
* Monad<T> = Array<T>|String<T>|Set<T>
|
|
9
|
-
* |TypedArray<T>|Stream<T>|Iterator<T>|AsyncIterator<T>
|
|
10
|
-
* |{ chain: T=>Monad<T> }|{ flatMap: T=>Monad<T> }|Object<T>
|
|
11
|
-
* Reducer<T> = (any, T)=>Promise|any
|
|
12
|
-
* Foldable<T> = Iterable<T>|AsyncIterable<T>|{ reduce: Reducer<T>=>any }|Object<T>
|
|
13
|
-
*
|
|
14
|
-
* var T any,
|
|
15
|
-
* monad Monad<Monad<T>|Foldable<T>|T>,
|
|
16
|
-
* args ...any,
|
|
17
|
-
* generatorFunction ...args=>Generator<Monad<T>|Foldable<T>|T>,
|
|
18
|
-
* asyncGeneratorFunction ...args=>AsyncGenerator<Monad<T>|Foldable<T>|T>,
|
|
19
|
-
* reducer Reducer<Monad<T>|Foldable<T>|T>
|
|
20
|
-
*
|
|
21
|
-
* flatten(monad) -> Monad<T>
|
|
22
|
-
*
|
|
23
|
-
* flatten(generatorFunction) -> ...args=>Generator<T>
|
|
24
|
-
*
|
|
25
|
-
* flatten(asyncGeneratorFunction) -> ...args=>AsyncGenerator<T>
|
|
26
|
-
*
|
|
27
|
-
* flatten(reducer) -> Reducer<T>
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @description
|
|
31
|
-
* Flatten a collection. Works in transducer position.
|
|
32
|
-
*
|
|
33
|
-
* ```javascript [playground]
|
|
34
|
-
* import flatten from 'https://unpkg.com/rubico/dist/x/flatten.es.js'
|
|
35
|
-
*
|
|
36
|
-
* flatten([
|
|
37
|
-
* [1, 1],
|
|
38
|
-
* new Set([2, 2]),
|
|
39
|
-
* (function* () { yield 3; yield 3 })(),
|
|
40
|
-
* (async function* () { yield 4; yield 4 })(),
|
|
41
|
-
* { a: 5, b: 5 },
|
|
42
|
-
* 6,
|
|
43
|
-
* Promise.resolve(7),
|
|
44
|
-
* new Uint8Array([8]),
|
|
45
|
-
* ]).then(console.log)
|
|
46
|
-
* // [1, 1, 2, 3, 3, 5, 5, 6, 7, 8, 4, 4]
|
|
47
|
-
*
|
|
48
|
-
* const add = (a, b) => a + b
|
|
49
|
-
*
|
|
50
|
-
* console.log(
|
|
51
|
-
* [[1], [2], [3], [4], [5]].reduce(flatten(add), 0),
|
|
52
|
-
* ) // 15
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* @TODO flatten for each type
|
|
56
|
-
*/
|
|
57
|
-
declare function flatten(value: any): any;
|
package/x/groupBy.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export = groupBy;
|
|
2
|
-
/**
|
|
3
|
-
* @name groupBy
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* Reducer<T> = (any, T)=>Promise|any
|
|
8
|
-
* Foldable<T> = Iterable<T>|AsyncIterable<T>|{ reduce: Reducer<T>=>any }|Object<T>
|
|
9
|
-
*
|
|
10
|
-
* var property any,
|
|
11
|
-
* resolver any=>Promise|any,
|
|
12
|
-
* value Foldable
|
|
13
|
-
*
|
|
14
|
-
* groupBy(property)(value) -> groupedByProperty Map<any=>Array>
|
|
15
|
-
*
|
|
16
|
-
* groupBy(resolver)(value) -> groupedByResolver Promise|Map<any=>Array>
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @description
|
|
20
|
-
* Group a foldable collection into a Map of arrays by a property on each of its elements.
|
|
21
|
-
*
|
|
22
|
-
* ```javascript [playground]
|
|
23
|
-
* import groupBy from 'https://unpkg.com/rubico/dist/x/groupBy.es.js'
|
|
24
|
-
*
|
|
25
|
-
* console.log(
|
|
26
|
-
* groupBy('age')([
|
|
27
|
-
* { name: 'John', age: 22 },
|
|
28
|
-
* { name: 'Jane', age: 22 },
|
|
29
|
-
* { name: 'Henry', age: 23 },
|
|
30
|
-
* ]),
|
|
31
|
-
* )
|
|
32
|
-
* // Map {
|
|
33
|
-
* // 22 => [{ name: 'John', age: 22 }, { name: 'Jane', age: 22 }],
|
|
34
|
-
* // 23 => [{ name: 'Henry', age: 23 }],
|
|
35
|
-
* // }
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* Additionally, pass a resolver in property position to resolve a value for group membership for each element.
|
|
39
|
-
*
|
|
40
|
-
* ```javascript [playground]
|
|
41
|
-
* import groupBy from 'https://unpkg.com/rubico/dist/x/groupBy.es.js'
|
|
42
|
-
*
|
|
43
|
-
* console.log(
|
|
44
|
-
* groupBy(
|
|
45
|
-
* word => word.toLowerCase(),
|
|
46
|
-
* )(['Hello', 'hello', 'Hey']),
|
|
47
|
-
* ) // Map { 'hello' => ['Hello', 'hello'], 'hey' => ['Hey'] }
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
declare function groupBy(propertyOrResolver: any): any;
|
package/x/has.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export = has;
|
|
2
|
-
/**
|
|
3
|
-
* @name has
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* has(key any)(container Set|Map|{ has: function }|Object) -> Promise|boolean
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Check if a collection has a key.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import has from 'https://unpkg.com/rubico/dist/x/has.es.js'
|
|
15
|
-
*
|
|
16
|
-
* console.log(
|
|
17
|
-
* has('a')({ a: 1, b: 2, c: 3 }),
|
|
18
|
-
* ) // true
|
|
19
|
-
*
|
|
20
|
-
* console.log(
|
|
21
|
-
* has('a')({}),
|
|
22
|
-
* ) // false
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
declare function has(key: any): (container: any) => any;
|
package/x/heapUsedInLoop.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export = heapUsedInLoop;
|
|
2
|
-
/**
|
|
3
|
-
* @name heapUsedInLoop
|
|
4
|
-
*
|
|
5
|
-
* @catchphrase
|
|
6
|
-
* max and avg heap used in loop
|
|
7
|
-
*
|
|
8
|
-
* @synopsis
|
|
9
|
-
* heapUsedInLoop(
|
|
10
|
-
* desc string,
|
|
11
|
-
* loopCount number,
|
|
12
|
-
* func (loop number)=>any
|
|
13
|
-
* ) -> ()
|
|
14
|
-
*
|
|
15
|
-
* @description
|
|
16
|
-
* **heapUsedInLoop** is a memory usage measurement function. Supply `description`, `loopCount`, and a function `func` for that function to be run `loopCount` times, finally logging average and max heap used per loop in terms of megabytes MiB.
|
|
17
|
-
*
|
|
18
|
-
* ```javascript
|
|
19
|
-
* heapUsedInLoop('my-description', 1e5, function () {
|
|
20
|
-
* return 1 + 1
|
|
21
|
-
* }) /*
|
|
22
|
-
* 0 5.88 MiB
|
|
23
|
-
* 1 5.92 MiB
|
|
24
|
-
* ...
|
|
25
|
-
* 99997 7.34 MiB
|
|
26
|
-
* 99998 7.34 MiB
|
|
27
|
-
* 99999 7.35 MiB
|
|
28
|
-
* my-description: 1e+5: {
|
|
29
|
-
* "max": "7.15 MiB",
|
|
30
|
-
* "avg": "5.50 MiB"
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* @node-only
|
|
35
|
-
*/
|
|
36
|
-
declare function heapUsedInLoop(desc: any, loopCount: any, func: any): void;
|
|
37
|
-
declare namespace heapUsedInLoop {
|
|
38
|
-
function skip(): void;
|
|
39
|
-
/**
|
|
40
|
-
* @name heapUsedInLoop.async
|
|
41
|
-
*
|
|
42
|
-
* @synopsis
|
|
43
|
-
* heapUsedInLoop.async(
|
|
44
|
-
* desc string,
|
|
45
|
-
* loopCount number,
|
|
46
|
-
* func (loop number)=>Promise|any
|
|
47
|
-
* ) -> ()
|
|
48
|
-
*/
|
|
49
|
-
function async(desc: any, loopCount: any, func: any): Promise<void>;
|
|
50
|
-
namespace async {
|
|
51
|
-
function skip(): void;
|
|
52
|
-
}
|
|
53
|
-
}
|
package/x/identity.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export = identity;
|
|
2
|
-
/**
|
|
3
|
-
* @name identity
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* identity(value any) -> value
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Pass a value and receive the same value back.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import identity from 'https://unpkg.com/rubico/dist/x/identity.es.js'
|
|
15
|
-
*
|
|
16
|
-
* console.log(
|
|
17
|
-
* identity(1),
|
|
18
|
-
* ) // 1
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
declare function identity(value: any): any;
|
package/x/includes.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export = includes;
|
|
2
|
-
/**
|
|
3
|
-
* @name includes
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* includes(value any)(container Array|String|Object) -> boolean
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Check if a collection includes another value by [SameValueZero](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero).
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import includes from 'https://unpkg.com/rubico/dist/x/includes.es.js'
|
|
15
|
-
*
|
|
16
|
-
* console.log(
|
|
17
|
-
* includes(5)([1, 2, 3, 4, 5])
|
|
18
|
-
* ) // true
|
|
19
|
-
*
|
|
20
|
-
* console.log(
|
|
21
|
-
* includes(5)([1, 2, 3])
|
|
22
|
-
* ) // false
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
declare function includes(value: any): (container: any) => any;
|
package/x/index.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import append = require("./append");
|
|
2
|
-
import callProp = require("./callProp");
|
|
3
|
-
import defaultsDeep = require("./defaultsDeep");
|
|
4
|
-
import differenceWith = require("./differenceWith");
|
|
5
|
-
import filterOut = require("./filterOut");
|
|
6
|
-
import find = require("./find");
|
|
7
|
-
import findIndex = require("./findIndex");
|
|
8
|
-
import first = require("./first");
|
|
9
|
-
import flatten = require("./flatten");
|
|
10
|
-
import groupBy = require("./groupBy");
|
|
11
|
-
import has = require("./has");
|
|
12
|
-
import identity = require("./identity");
|
|
13
|
-
import includes = require("./includes");
|
|
14
|
-
import isDeepEqual = require("./isDeepEqual");
|
|
15
|
-
import isEmpty = require("./isEmpty");
|
|
16
|
-
import isEqual = require("./isEqual");
|
|
17
|
-
import isFunction = require("./isFunction");
|
|
18
|
-
import isObject = require("../_internal/isObject");
|
|
19
|
-
import isString = require("./isString");
|
|
20
|
-
import keys = require("./keys");
|
|
21
|
-
import last = require("./last");
|
|
22
|
-
import maxBy = require("./maxBy");
|
|
23
|
-
import noop = require("./noop");
|
|
24
|
-
import pluck = require("./pluck");
|
|
25
|
-
import prepend = require("./prepend");
|
|
26
|
-
import size = require("./size");
|
|
27
|
-
import trace = require("./trace");
|
|
28
|
-
import unionWith = require("./unionWith");
|
|
29
|
-
import uniq = require("./uniq");
|
|
30
|
-
import unless = require("./unless");
|
|
31
|
-
import values = require("./values");
|
|
32
|
-
import when = require("./when");
|
|
33
|
-
import isIn = require("./isIn");
|
|
34
|
-
export { append, callProp, defaultsDeep, differenceWith, filterOut, find, findIndex, first, flatten, groupBy, has, identity, includes, isDeepEqual, isEmpty, isEqual, isFunction, isObject, isString, keys, last, maxBy, noop, pluck, prepend, size, trace, unionWith, uniq, unless, values, when, isIn };
|
package/x/is.d.ts
DELETED
package/x/isDeepEqual.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export = isDeepEqual;
|
|
2
|
-
/**
|
|
3
|
-
* @name isDeepEqual
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* Nested<T> = Array<Array<T>|Object<T>|Iterable<T>|T>|Object<Array<T>|Object<T>|Iterable<T>|T>
|
|
8
|
-
*
|
|
9
|
-
* var left Nested,
|
|
10
|
-
* right Nested
|
|
11
|
-
*
|
|
12
|
-
* isDeepEqual(left, right) -> boolean
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* @description
|
|
16
|
-
* Check two values for deep [SameValueZero](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) equality.
|
|
17
|
-
*
|
|
18
|
-
* ```javascript [playground]
|
|
19
|
-
* import isDeepEqual from 'https://unpkg.com/rubico/dist/x/isDeepEqual.es.js'
|
|
20
|
-
*
|
|
21
|
-
* console.log(
|
|
22
|
-
* isDeepEqual({ a: 1, b: 2, c: [3] }, { a: 1, b: 2, c: [3] }),
|
|
23
|
-
* ) // true
|
|
24
|
-
*
|
|
25
|
-
* console.log(
|
|
26
|
-
* isDeepEqual({ a: 1, b: 2, c: [3] }, { a: 1, b: 2, c: [5] }),
|
|
27
|
-
* ) // false
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* When passed a resolver function as the left or right argument or resolvers as both arguments, returns a function that resolves the value by the resolver before performing the deep equal comparison.
|
|
31
|
-
*
|
|
32
|
-
* ```javascript [playground]
|
|
33
|
-
* import isDeepEqual from 'https://unpkg.com/rubico/dist/x/isDeepEqual.es.js'
|
|
34
|
-
*
|
|
35
|
-
* const isPropADeepEqualTo123Array = isDeepEqual(object => object.a, [1, 2, 3])
|
|
36
|
-
*
|
|
37
|
-
* console.log(
|
|
38
|
-
* isPropADeepEqualTo123Array({ a: [1, 2, 3] }),
|
|
39
|
-
* ) // true
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
declare function isDeepEqual(left: any, right: any): any;
|
package/x/isEmpty.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export = isEmpty;
|
|
2
|
-
/**
|
|
3
|
-
* @name isEmpty
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* isEmpty(value any) -> boolean
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Check if a value is empty.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import isEmpty from 'https://unpkg.com/rubico/dist/x/isEmpty.es.js'
|
|
15
|
-
*
|
|
16
|
-
* console.log('', isEmpty('')) // true
|
|
17
|
-
* console.log([], isEmpty([])) // true
|
|
18
|
-
* console.log({}, isEmpty({})) // true
|
|
19
|
-
* console.log([1, 2, 3], isEmpty([1, 2, 3])) // false
|
|
20
|
-
* console.log(new Set([1, 2, 3]), isEmpty(new Set([1, 2, 3]))) // false
|
|
21
|
-
* console.log({ a: 1, b: 2, c: 3 }, isEmpty({ a: 1, b: 2, c: 3 })) // false
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
declare function isEmpty(value: any): boolean;
|
package/x/isEqual.d.ts
DELETED
package/x/isFunction.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export = isFunction;
|
|
2
|
-
/**
|
|
3
|
-
* @name isFunction
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* isFunction(value any) -> boolean
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Determine whether a value is a function.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import isFunction from 'https://unpkg.com/rubico/dist/x/isFunction.es.js'
|
|
15
|
-
*
|
|
16
|
-
* const add = (a, b) => a + b
|
|
17
|
-
*
|
|
18
|
-
* console.log(
|
|
19
|
-
* isFunction(add),
|
|
20
|
-
* ) // true
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
declare function isFunction(value: any): boolean;
|
package/x/isIn.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export = isIn;
|
|
2
|
-
/**
|
|
3
|
-
* @name isIn
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* isIn(container Array|Object|String|Set|Map)(value any) -> boolean
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Counterpart to includes. Check if a collection includes another value.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import isIn from 'https://unpkg.com/rubico/dist/x/isIn.es.js'
|
|
15
|
-
*
|
|
16
|
-
* console.log(
|
|
17
|
-
* isIn([1, 2, 3](1)
|
|
18
|
-
* ) // true
|
|
19
|
-
*
|
|
20
|
-
* console.log(
|
|
21
|
-
* isIn([1, 2, 3](4)
|
|
22
|
-
* ) // false
|
|
23
|
-
*
|
|
24
|
-
* console.log(
|
|
25
|
-
* isIn({ a: 1 })(1)
|
|
26
|
-
* ) // true
|
|
27
|
-
*
|
|
28
|
-
* console.log(
|
|
29
|
-
* isIn({ a: 1 })(2)
|
|
30
|
-
* ) // true
|
|
31
|
-
*
|
|
32
|
-
* console.log(
|
|
33
|
-
* isIn('abc')('a')
|
|
34
|
-
* ) // true
|
|
35
|
-
*
|
|
36
|
-
* console.log(
|
|
37
|
-
* isIn('abc')('ab')
|
|
38
|
-
* ) // true
|
|
39
|
-
*
|
|
40
|
-
* console.log(
|
|
41
|
-
* isIn('abc')('d')
|
|
42
|
-
* ) // false
|
|
43
|
-
*
|
|
44
|
-
* console.log(
|
|
45
|
-
* isIn(new Set([1, 2, 3]))(1)
|
|
46
|
-
* ) // true
|
|
47
|
-
*
|
|
48
|
-
* console.log(
|
|
49
|
-
* isIn(new Set([1, 2, 3]))(4)
|
|
50
|
-
* ) // false
|
|
51
|
-
*
|
|
52
|
-
* console.log(
|
|
53
|
-
* isIn(new Map([[1, 1], [2, 2], [3, 3]]))(1)
|
|
54
|
-
* ) // true
|
|
55
|
-
*
|
|
56
|
-
* console.log(
|
|
57
|
-
* isIn(new Map([[1, 1], [2, 2], [3, 3]]))(4)
|
|
58
|
-
* ) // false
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
declare function isIn(...args: any[]): any;
|
package/x/isObject.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/x/isString.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export = isString;
|
|
2
|
-
/**
|
|
3
|
-
* @name isString
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* isString(value any) -> boolean
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Determine whether a value is a string.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import isString from 'https://unpkg.com/rubico/dist/x/isString.es.js'
|
|
15
|
-
*
|
|
16
|
-
* console.log(
|
|
17
|
-
* isString('hey'),
|
|
18
|
-
* ) // true
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
declare function isString(value: any): boolean;
|
package/x/keys.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export = keys;
|
|
2
|
-
/**
|
|
3
|
-
* @name keys
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* keys(value string|Array|Set|Map|object) -> Array<key number|string>
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Get an array of keys from an instance.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import keys from 'https://unpkg.com/rubico/dist/x/keys.es.js'
|
|
15
|
-
*
|
|
16
|
-
* console.log(keys({ a: 1, b: 2, c: 3 })) // ['a', 'b', 'c']
|
|
17
|
-
* console.log(keys(['hello', 'world'])) // [0, 1]
|
|
18
|
-
* console.log(keys(new Map([['hello', 1], ['world', 2]]))) // ['hello', 'world']
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @since 1.6.25
|
|
22
|
-
*/
|
|
23
|
-
declare function keys(object: any): any[];
|
package/x/last.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export = last;
|
|
2
|
-
/**
|
|
3
|
-
* @name last
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* var value Array|string
|
|
8
|
-
*
|
|
9
|
-
* last(value) -> any
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
* @description
|
|
13
|
-
* Get the last element of a collection
|
|
14
|
-
*
|
|
15
|
-
* ```javascript [playground]
|
|
16
|
-
* import last from 'https://unpkg.com/rubico/dist/x/last.es.js'
|
|
17
|
-
*
|
|
18
|
-
* console.log(last([1, 2, 3])) // 3
|
|
19
|
-
* console.log(last([])) // undefined
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
declare function last(value: any): any;
|
package/x/maxBy.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export = maxBy;
|
|
2
|
-
/**
|
|
3
|
-
* @name maxBy
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* maxBy(array Array, path string) -> maxElementByPath any
|
|
8
|
-
*
|
|
9
|
-
* maxBy(path string)(array Array) -> maxElementByPath any
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
* @description
|
|
13
|
-
* Finds the element that is the max by a property denoted by path.
|
|
14
|
-
*
|
|
15
|
-
* ```javascript [playground]
|
|
16
|
-
* import maxBy from 'https://unpkg.com/rubico/dist/x/maxBy.es.js'
|
|
17
|
-
*
|
|
18
|
-
* const array = [{ a: 1 }, { a: 2 }, { a: 3 }]
|
|
19
|
-
*
|
|
20
|
-
* const maxElement = maxBy(array, 'a')
|
|
21
|
-
*
|
|
22
|
-
* console.log(maxElement) // { a: 3 }
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* `maxBy` composes in a lazy way.
|
|
26
|
-
*
|
|
27
|
-
* ```javascript [playground]
|
|
28
|
-
* import maxBy from 'https://unpkg.com/rubico/dist/x/maxBy.es.js'
|
|
29
|
-
*
|
|
30
|
-
* const numbers = [1, 2, 3]
|
|
31
|
-
*
|
|
32
|
-
* const maxElement = pipe(numbers, [
|
|
33
|
-
* map(number => number ** 2),
|
|
34
|
-
* map(number => ({ a: { b: { c: number } } })),
|
|
35
|
-
* maxBy('a.b.c')
|
|
36
|
-
* ])
|
|
37
|
-
*
|
|
38
|
-
* console.log(maxElement) // { a: { b: { c: 9 } } }
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
declare function maxBy(...args: any[]): any;
|
package/x/noop.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export = noop;
|
|
2
|
-
/**
|
|
3
|
-
* @name noop
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* noop() -> undefined
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Doesn't do anything.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import noop from 'https://unpkg.com/rubico/dist/x/noop.es.js'
|
|
15
|
-
*
|
|
16
|
-
* console.log(
|
|
17
|
-
* noop(),
|
|
18
|
-
* ) // undefined
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
declare function noop(): void;
|