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/dist/x/size.es.js
CHANGED
package/dist/x/size.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.8
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
|
-
* (c) 2019-
|
|
4
|
+
* (c) 2019-2026 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
const objectKeysLength=e=>{let t=0;for(const n in e)t+=1;return t},size=e=>"string"==typeof e?e.length:null==e?0:"number"==typeof e.length?e.length:"number"==typeof e.size?e.size:e.constructor==Object?objectKeysLength(e):1;export default size;
|
package/dist/x/size.js
CHANGED
package/dist/x/size.min.js
CHANGED
package/dist/x/size.mjs
CHANGED
package/dist/x/trace.es.js
CHANGED
package/dist/x/trace.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.8
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
|
-
* (c) 2019-
|
|
4
|
+
* (c) 2019-2026 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
const isPromise=r=>null!=r&&"function"==typeof r.then,funcConcat=(r,n)=>function(...e){const t=r(...e);return isPromise(t)?t.then(n):n(t)},always=r=>function(){return r},thunkifyArgs=(r,n)=>function(){return r(...n)},thunkConditional=(r,n,e)=>r?n():e(),__=Symbol.for("placeholder"),curry2ResolveArg0=(r,n)=>function(e){return r(e,n)},curry2ResolveArg1=(r,n)=>function(e){return r(n,e)},curry2=function(r,n,e){return n==__?curry2ResolveArg0(r,e):curry2ResolveArg1(r,n)},curry3ResolveArg0=(r,n,e)=>function(t){return r(t,n,e)},curry3ResolveArg1=(r,n,e)=>function(t){return r(n,t,e)},curry3ResolveArg2=(r,n,e)=>function(t){return r(n,e,t)},curry3=function(r,n,e,t){return n==__?curry3ResolveArg0(r,e,t):e==__?curry3ResolveArg1(r,n,t):curry3ResolveArg2(r,n,e)},curryArgs2ResolveArgs0=(r,n,e)=>function(...e){return r(e,n)},curryArgs2ResolveArgs1=(r,n,e)=>function(...e){return r(n,e)},curryArgs2=function(r,n,e){return n==__?curryArgs2ResolveArgs0(r,e):curryArgs2ResolveArgs1(r,n)},curryArgs3ResolveArgs0=(r,n,e)=>function(...t){return r(t,n,e)},curryArgs3ResolveArgs1=(r,n,e)=>function(...t){return r(n,t,e)},curryArgs3ResolveArgs2=(r,n,e)=>function(...t){return r(n,e,t)},curryArgs3=function(r,n,e,t){return n==__?curryArgs3ResolveArgs0(r,e,t):e==__?curryArgs3ResolveArgs1(r,n,t):curryArgs3ResolveArgs2(r,n,e)},isArray=Array.isArray,areAnyValuesPromises=function(r){if(isArray(r)){const n=r.length;let e=-1;for(;++e<n;){const n=r[e];if(isPromise(n))return!0}return!1}for(const n in r){const e=r[n];if(isPromise(e))return!0}return!1},promiseAll=Promise.all.bind(Promise),_tap=function(r,n){const e=r[0],t=n(...r);return isPromise(t)?t.then(always(e)):e},tap=function(...r){const n=r.pop();return 0==r.length?curryArgs2(_tap,__,n):areAnyValuesPromises(r)?promiseAll(r).then(curry2(_tap,__,n)):_tap(r,n)},_tapIf=function(r,n,e){const t=r(...e);if(isPromise(t))return t.then(curry3(thunkConditional,__,thunkifyArgs(tap(n),e),always(e[0])));if(t){const r=n(...e);if(isPromise(r))return r.then(always(e[0]))}return e[0]};tap.if=function(...r){if(2==r.length)return curryArgs3(_tapIf,r[0],r[1],__);const n=r.length,e=r[n-1],t=r[n-2],o=r.slice(0,-2);return areAnyValuesPromises(o)?promiseAll(o).then(curry3(_tapIf,t,e,__)):_tapIf(t,e,r)};const consoleLog=console.log,trace=function(...r){const n=r[0];return"function"==typeof n?tap(funcConcat(n,consoleLog)):tap(consoleLog)(...r)};export default trace;
|
package/dist/x/trace.js
CHANGED
package/dist/x/trace.min.js
CHANGED
package/dist/x/trace.mjs
CHANGED
package/dist/x/unionWith.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.8
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
|
-
* (c) 2019-
|
|
4
|
+
* (c) 2019-2026 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
const isArray=Array.isArray,isPromise=r=>null!=r&&"function"==typeof r.then,promiseAll=Promise.all.bind(Promise),__=Symbol.for("placeholder"),curry3ResolveArg0=(r,n,t)=>function(e){return r(e,n,t)},curry3ResolveArg1=(r,n,t)=>function(e){return r(n,e,t)},curry3ResolveArg2=(r,n,t)=>function(e){return r(n,t,e)},curry3=function(r,n,t,e){return n==__?curry3ResolveArg0(r,t,e):t==__?curry3ResolveArg1(r,n,e):curry3ResolveArg2(r,n,t)},thunkify2=(r,n,t)=>function(){return r(n,t)},thunkify4=(r,n,t,e,o)=>function(){return r(n,t,e,o)},funcConcatSync=(r,n)=>function(...t){return n(r(...t))},callPropUnary=(r,n,t)=>r[n](t),thunkConditional=(r,n,t)=>r?n():t(),arrayPush=function(r,n){return r.push(n),r},always=r=>function(){return r},curry2ResolveArg0=(r,n)=>function(t){return r(t,n)},curry2ResolveArg1=(r,n)=>function(t){return r(n,t)},curry2=function(r,n,t){return n==__?curry2ResolveArg0(r,t):curry2ResolveArg1(r,n)},getArg1=(r,n)=>n,identity=r=>r,asyncIteratorForEach=async function(r,n){const t=[];for await(const e of r){const r=n(e);isPromise(r)&&t.push(r)}return 0==t.length?r:promiseAll(t).then(always(r))},symbolIterator=Symbol.iterator,symbolAsyncIterator=Symbol.asyncIterator,arrayFlatten=function(r){const n=r.length,t=[],e=[];let o=-1;for(;++o<n;){const n=r[o];if(isArray(n)){const r=n.length;let t=-1;for(;++t<r;)e.push(n[t])}else if(null==n)e.push(n);else if("function"==typeof n.then)t.push(n.then(curry2(arrayPush,e,__)));else if("function"==typeof n[symbolIterator])for(const r of n)e.push(r);else if("function"==typeof n[symbolAsyncIterator])t.push(asyncIteratorForEach(n[symbolAsyncIterator](),curry2(arrayPush,e,__)));else if("function"==typeof n.chain){const r=n.chain(identity);isPromise(r)?t.push(r.then(curry2(arrayPush,e,__))):e.push(r)}else if("function"==typeof n.flatMap){const r=n.flatMap(identity);isPromise(r)?t.push(r.then(curry2(arrayPush,e,__))):e.push(r)}else if("function"==typeof n.reduce){const r=n.reduce(funcConcatSync(getArg1,curry2(arrayPush,e,__)),null);isPromise(r)&&t.push(r)}else if(n.constructor==Object)for(const r in n)e.push(n[r]);else e.push(n)}return 0==t.length?e:promiseAll(t).then(always(e))},noop=function(){},arrayIncludesWith=function(r,n,t){const e=r.length,o=[];let s=-1;for(;++s<e;){const e=t(n,r[s]);if(isPromise(e))o.push(e);else if(e)return!0}return 0!=o.length&&promiseAll(o).then(curry3(callPropUnary,__,"some",Boolean))},arrayUniqWithAsync=async function(r,n,t,e){const o=r.length;for(;++e<o;){const o=r[e],s=arrayIncludesWith(t,o,n);(isPromise(s)?await s:s)||t.push(o)}return t},arrayUniqWith=function(r,n){const t=r.length,e=[];let o=-1;for(;++o<t;){const t=r[o],s=arrayIncludesWith(e,t,n);if(isPromise(s))return s.then(funcConcatSync(curry3(thunkConditional,__,noop,thunkify2(arrayPush,e,t)),thunkify4(arrayUniqWithAsync,r,n,e,o)));s||e.push(t)}return e},unionWith=r=>function(n){if(isArray(n))return arrayUniqWith(arrayFlatten(n),r);throw new TypeError(`${n} is not an Array`)};export default unionWith;
|
package/dist/x/unionWith.js
CHANGED
package/dist/x/unionWith.min.js
CHANGED
package/dist/x/unionWith.mjs
CHANGED
package/dist/x/uniq.es.js
CHANGED
package/dist/x/uniq.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.8
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
|
-
* (c) 2019-
|
|
4
|
+
* (c) 2019-2026 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
const isArray=Array.isArray,uniq=r=>{if(!isArray(r))throw Error("uniq(arr): arr is not an array");return[...new Set(r)]};export default uniq;
|
package/dist/x/uniq.js
CHANGED
package/dist/x/uniq.min.js
CHANGED
package/dist/x/uniq.mjs
CHANGED
package/dist/x/unless.es.js
CHANGED
package/dist/x/unless.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.8
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
|
-
* (c) 2019-
|
|
4
|
+
* (c) 2019-2026 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
const isPromise=r=>null!=r&&"function"==typeof r.then,always=r=>function(){return r},__=Symbol.for("placeholder"),thunkify1=(r,n)=>function(){return r(n)},curry3ResolveArg0=(r,n,u)=>function(e){return r(e,n,u)},curry3ResolveArg1=(r,n,u)=>function(e){return r(n,e,u)},curry3ResolveArg2=(r,n,u)=>function(e){return r(n,u,e)},curry3=function(r,n,u,e){return n==__?curry3ResolveArg0(r,u,e):u==__?curry3ResolveArg1(r,n,e):curry3ResolveArg2(r,n,u)},thunkConditional=(r,n,u)=>r?n():u(),unless=(r,n)=>function(u){const e=r(u);return isPromise(e)?e.then(curry3(thunkConditional,__,always(u),thunkify1(n,u))):e?u:n(u)};export default unless;
|
package/dist/x/unless.js
CHANGED
package/dist/x/unless.min.js
CHANGED
package/dist/x/unless.mjs
CHANGED
package/dist/x/values.es.js
CHANGED
package/dist/x/values.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.8
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
|
-
* (c) 2019-
|
|
4
|
+
* (c) 2019-2026 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
const objectValues=Object.values,values=e=>null==e?[]:"function"==typeof e.values?[...e.values()]:objectValues(e);export default values;
|
package/dist/x/values.js
CHANGED
package/dist/x/values.min.js
CHANGED
package/dist/x/values.mjs
CHANGED
package/dist/x/when.es.js
CHANGED
package/dist/x/when.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.8
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
|
-
* (c) 2019-
|
|
4
|
+
* (c) 2019-2026 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
const isPromise=r=>null!=r&&"function"==typeof r.then,always=r=>function(){return r},__=Symbol.for("placeholder"),thunkify1=(r,n)=>function(){return r(n)},curry3ResolveArg0=(r,n,e)=>function(u){return r(u,n,e)},curry3ResolveArg1=(r,n,e)=>function(u){return r(n,u,e)},curry3ResolveArg2=(r,n,e)=>function(u){return r(n,e,u)},curry3=function(r,n,e,u){return n==__?curry3ResolveArg0(r,e,u):e==__?curry3ResolveArg1(r,n,u):curry3ResolveArg2(r,n,e)},thunkConditional=(r,n,e)=>r?n():e(),when=(r,n)=>function(e){const u=r(e);return isPromise(u)?u.then(curry3(thunkConditional,__,thunkify1(n,e),always(e))):u?n(e):e};export default when;
|
package/dist/x/when.js
CHANGED
package/dist/x/when.min.js
CHANGED
package/dist/x/when.mjs
CHANGED
package/es.js
CHANGED
package/flatMap.js
CHANGED
|
@@ -111,7 +111,7 @@ const _flatMap = function (value, flatMapper) {
|
|
|
111
111
|
* // [1, 1, 2, 3, 3, 5, 5, 8, 7, 7]
|
|
112
112
|
* ```
|
|
113
113
|
*
|
|
114
|
-
* Values from async generators are muxed. Muxing, or asynchronously "mixing", is the process of combining multiple asynchronous sources into one source, with order determined by the asynchronous resolution of the individual elements.
|
|
114
|
+
* Values from async generators are muxed. Muxing, or asynchronously "mixing", is the process of combining multiple asynchronous sources into one source, with order determined by the asynchronous resolution of the individual promise elements.
|
|
115
115
|
*
|
|
116
116
|
* ```javascript [playground]
|
|
117
117
|
* const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rubico",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.8",
|
|
4
4
|
"description": "[a]synchronous functional programming",
|
|
5
5
|
"author": "Richard Tong",
|
|
6
6
|
"license": "MIT",
|
|
@@ -76,24 +76,17 @@
|
|
|
76
76
|
"operator"
|
|
77
77
|
],
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"async": "latest",
|
|
80
|
-
"bluebird": "latest",
|
|
81
79
|
"codecov": "^3.7.1",
|
|
82
|
-
"fantasy-land": "latest",
|
|
83
|
-
"lodash": "latest",
|
|
84
80
|
"mocha": "^11.1.0",
|
|
85
81
|
"node-fetch": "^2.6.1",
|
|
86
82
|
"nyc": "^15.1.0",
|
|
87
|
-
"ramda": "latest",
|
|
88
83
|
"terser": "^5.39.0",
|
|
89
|
-
"thunk-test": "latest"
|
|
90
|
-
"typescript": "latest"
|
|
84
|
+
"thunk-test": "latest"
|
|
91
85
|
},
|
|
92
86
|
"scripts": {
|
|
93
87
|
"test": "mocha test.js *.test.js */**.test.js",
|
|
94
88
|
"test-coverage": "nyc mocha test.js x/*.test.js monad/*.test.js",
|
|
95
89
|
"build": "npm run dts && ./build",
|
|
96
|
-
"bench": "./bench"
|
|
97
|
-
"dts": "del *.d.ts _internal/*.d.ts x/*.d.ts && tsc"
|
|
90
|
+
"bench": "./bench"
|
|
98
91
|
}
|
|
99
92
|
}
|
package/x/append.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export = append;
|
|
2
|
-
/**
|
|
3
|
-
* @name append
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* append(
|
|
8
|
-
* element string|Array,
|
|
9
|
-
* )(value string|Array) -> string|array
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
* @description
|
|
13
|
-
* Append a string or an array.
|
|
14
|
-
*
|
|
15
|
-
* ```javascript [playground]
|
|
16
|
-
* import append from 'https://unpkg.com/rubico/dist/x/append.es.js'
|
|
17
|
-
*
|
|
18
|
-
* const myArray = ['orange', 'apple']
|
|
19
|
-
*
|
|
20
|
-
* {
|
|
21
|
-
* const result = append(['ananas'])(myArray)
|
|
22
|
-
* console.log(result) // ['orange', 'apple', 'ananas']
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* {
|
|
26
|
-
* const result = append('ananas')(myArray)
|
|
27
|
-
* console.log(result) // ['orange', 'apple', 'ananas']
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* {
|
|
31
|
-
* const result = append('world')('hello ')
|
|
32
|
-
* console.log(result) // 'hello world'
|
|
33
|
-
* }
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @since 1.7.3
|
|
37
|
-
*/
|
|
38
|
-
declare function append(element: any): (value: any) => string | any[];
|
package/x/callProp.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export = callProp;
|
|
2
|
-
/**
|
|
3
|
-
* @name callProp
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* callProp(property string, ...args)(object) -> object[property](...args)
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Calls a property on an object with arguments.
|
|
12
|
-
*
|
|
13
|
-
* ```javascript [playground]
|
|
14
|
-
* import callProp from 'https://unpkg.com/rubico/dist/x/callProp.es.js'
|
|
15
|
-
*
|
|
16
|
-
* const priceRoundedDown = callProp('toFixed', 2)(5.992)
|
|
17
|
-
* console.log('priceRoundedDown:', priceRoundedDown) // '5.99'
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
declare function callProp(property: any, ...args: any[]): (object: any) => any;
|
package/x/defaultsDeep.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export = defaultsDeep;
|
|
2
|
-
/**
|
|
3
|
-
* @name defaultsDeep
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* var defaultCollection Array|Object,
|
|
8
|
-
* value Array|Object
|
|
9
|
-
*
|
|
10
|
-
* defaultsDeep(defaultCollection)(value) -> Array|Object
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @description
|
|
14
|
-
* Deeply assign default values to an array or object by an array or object of possibly nested default values.
|
|
15
|
-
*
|
|
16
|
-
* ```javascript [playground]
|
|
17
|
-
* import defaultsDeep from 'https://unpkg.com/rubico/dist/x/defaultsDeep.es.js'
|
|
18
|
-
*
|
|
19
|
-
* const defaultUser = defaultsDeep({
|
|
20
|
-
* name: 'placeholder',
|
|
21
|
-
* images: [
|
|
22
|
-
* { url: 'https://via.placeholder.com/150' },
|
|
23
|
-
* { url: 'https://via.placeholder.com/150' },
|
|
24
|
-
* { url: 'https://via.placeholder.com/150' },
|
|
25
|
-
* ],
|
|
26
|
-
* })
|
|
27
|
-
*
|
|
28
|
-
* console.log(defaultUser({
|
|
29
|
-
* name: 'John',
|
|
30
|
-
* images: [{ url: 'https://via.placeholder.com/150/0000FF/808080%20?Text=Digital.com' }],
|
|
31
|
-
* }))
|
|
32
|
-
* // {
|
|
33
|
-
* // name: 'John',
|
|
34
|
-
* // images: [
|
|
35
|
-
* // { url: 'https://via.placeholder.com/150/0000FF/808080%20?Text=Digital.com' },
|
|
36
|
-
* // { url: 'https://via.placeholder.com/150' },
|
|
37
|
-
* // { url: 'https://via.placeholder.com/150' },
|
|
38
|
-
* // ],
|
|
39
|
-
* // }
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
declare function defaultsDeep(defaultCollection: any): (value: any) => any;
|
package/x/differenceWith.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export = differenceWith;
|
|
2
|
-
/**
|
|
3
|
-
* @name differenceWith
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* differenceWith(
|
|
8
|
-
* comparator (any, any)=>Promise|boolean,
|
|
9
|
-
* allValues Array,
|
|
10
|
-
* )(values Array) -> someOrAllValues Array
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @description
|
|
14
|
-
* Create an array of all the values in an array that are not in another array as dictated by a comparator.
|
|
15
|
-
*
|
|
16
|
-
* ```javascript [playground]
|
|
17
|
-
* import differenceWith from 'https://unpkg.com/rubico/dist/x/differenceWith.es.js'
|
|
18
|
-
* import isDeepEqual from 'https://unpkg.com/rubico/dist/x/isDeepEqual.es.js'
|
|
19
|
-
*
|
|
20
|
-
* console.log(
|
|
21
|
-
* differenceWith(isDeepEqual, [{ a: 1 }, { b: 2 }, { c: 3 }])([{ b: 2 }]),
|
|
22
|
-
* ) // [{ a: 1 }, { c: 3 }]
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
declare function differenceWith(comparator: any, allValues: any): (values: any) => any;
|
package/x/filterOut.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export = filterOut;
|
|
2
|
-
/**
|
|
3
|
-
* @name filterOut
|
|
4
|
-
*
|
|
5
|
-
* @synopsis
|
|
6
|
-
* ```coffeescript [specscript]
|
|
7
|
-
* filterOut(
|
|
8
|
-
* arrayPredicate (value any, index number, array Array)=>Promise|boolean
|
|
9
|
-
* )(array) -> rejectedArray Promise|Array
|
|
10
|
-
*
|
|
11
|
-
* filterOut(
|
|
12
|
-
* objectPredicate (value any, key string, object Object)=>Promise|boolean
|
|
13
|
-
* )(object) -> rejectedObject Promise|Object
|
|
14
|
-
*
|
|
15
|
-
* filterOut(
|
|
16
|
-
* setPredicate (value any, value, set Set)=>Promise|boolean
|
|
17
|
-
* )(set) -> rejectedSet Promise|Set
|
|
18
|
-
*
|
|
19
|
-
* filterOut(
|
|
20
|
-
* mapPredicate (value any, key any, map Map)=>Promise|boolean
|
|
21
|
-
* )(map) -> rejectedMap Promise|Map
|
|
22
|
-
*
|
|
23
|
-
* filterOut(
|
|
24
|
-
* predicate (value any)=>Promise|boolean
|
|
25
|
-
* )(generatorFunction GeneratorFunction) -> rejectingGeneratorFunction GeneratorFunction
|
|
26
|
-
*
|
|
27
|
-
* filterOut(
|
|
28
|
-
* predicate (value any)=>Promise|boolean
|
|
29
|
-
* )(asyncGeneratorFunction AsyncGeneratorFunction) -> rejectingAsyncGeneratorFunction AsyncGeneratorFunction
|
|
30
|
-
*
|
|
31
|
-
* filterOut(
|
|
32
|
-
* predicate (value any)=>Promise|boolean
|
|
33
|
-
* )(reducer Reducer) -> rejectingReducer Reducer
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @description
|
|
37
|
-
* The inverse of `filter`. Values that test true by the predicate are filtered out, or "rejected".
|
|
38
|
-
*/
|
|
39
|
-
declare function filterOut(predicate: any): any;
|