rubico 2.7.7 → 2.7.9
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/_internal/arrayForEach.js +1 -1
- package/_internal/arrayForEachSeries.js +1 -1
- package/_internal/objectForEach.js +1 -1
- package/_internal/objectForEachSeries.js +1 -1
- 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 +6 -6
- package/dist/forEach.es.min.js +3 -3
- package/dist/forEach.js +6 -6
- package/dist/forEach.min.js +3 -3
- package/dist/forEach.mjs +6 -6
- 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 +6 -6
- package/dist/rubico.es.min.js +3 -3
- package/dist/rubico.global.js +6 -6
- package/dist/rubico.global.min.js +3 -3
- package/dist/rubico.js +6 -6
- package/dist/rubico.min.js +3 -3
- package/dist/rubico.mjs +6 -6
- 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 +6 -6
- package/flatMap.js +1 -1
- package/index.js +6 -6
- package/package.json +2 -8
package/dist/lt.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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,isArray=Array.isArray,areAnyValuesPromises=function(r){if(isArray(r)){const e=r.length;let s=-1;for(;++s<e;){const e=r[s];if(isPromise(e))return!0}return!1}for(const e in r){const s=r[e];if(isPromise(s))return!0}return!1},__=Symbol.for("placeholder"),curry4ResolveArg0=(r,e,s,o)=>function(t){return r(t,e,s,o)},curry4ResolveArg1=(r,e,s,o)=>function(t){return r(e,t,s,o)},curry4ResolveArg2=(r,e,s,o)=>function(t){return r(e,s,t,o)},curry4ResolveArg3=(r,e,s,o)=>function(t){return r(e,s,o,t)},curry4=function(r,e,s,o,t){return e==__?curry4ResolveArg0(r,s,o,t):s==__?curry4ResolveArg1(r,e,o,t):o==__?curry4ResolveArg2(r,e,s,t):curry4ResolveArg3(r,e,s,o)},curryArgs4ResolveArgs0=(r,e,s,o)=>function(...t){return r(t,e,s,o)},curryArgs4ResolveArgs1=(r,e,s,o)=>function(...t){return r(e,t,s,o)},curryArgs4ResolveArgs2=(r,e,s,o)=>function(...t){return r(e,s,t,o)},curryArgs4ResolveArgs3=(r,e,s,o)=>function(...t){return r(e,s,o,t)},curryArgs4=function(r,e,s,o,t){return e==__?curryArgs4ResolveArgs0(r,s,o,t):s==__?curryArgs4ResolveArgs1(r,e,o,t):o==__?curryArgs4ResolveArgs2(r,e,s,t):curryArgs4ResolveArgs3(r,e,s,o)},spread2=r=>function([e,s]){return r(e,s)},promiseAll=Promise.all.bind(Promise),leftResolverRightResolverCompare=function(r,e,s,o){const t=s(...r),l=o(...r);return isPromise(t)||isPromise(l)?promiseAll([t,l]).then(spread2(e)):e(t,l)},leftResolverRightValueCompare=function(r,e,s,o){const t=s(...r);return isPromise(t)||isPromise(o)?promiseAll([t,o]).then(spread2(e)):e(t,o)},leftValueRightResolverCompare=function(r,e,s,o){const t=o(...r);return isPromise(s)||isPromise(t)?promiseAll([s,t]).then(spread2(e)):e(s,t)},ComparisonOperator=r=>function(...e){const s=e.pop(),o=e.pop(),t="function"==typeof o,l="function"==typeof s;return t&&l?0==e.length?curryArgs4(leftResolverRightResolverCompare,__,r,o,s):areAnyValuesPromises(e)?promiseAll(e).then(curry4(leftResolverRightResolverCompare,__,r,o,s)):leftResolverRightResolverCompare(e,r,o,s):t?0==e.length?curryArgs4(leftResolverRightValueCompare,__,r,o,s):areAnyValuesPromises(e)?promiseAll(e).then(curry4(leftResolverRightValueCompare,__,r,o,s)):leftResolverRightValueCompare(e,r,o,s):l?0==e.length?curryArgs4(leftValueRightResolverCompare,__,r,o,s):areAnyValuesPromises(e)?promiseAll(e).then(curry4(leftValueRightResolverCompare,__,r,o,s)):leftValueRightResolverCompare(e,r,o,s):isPromise(o)||isPromise(s)?promiseAll([o,s]).then(spread2(r)):r(o,s)},lessThan=(r,e)=>r<e,lt=ComparisonOperator(lessThan);export default lt;
|
package/dist/lt.js
CHANGED
package/dist/lt.min.js
CHANGED
package/dist/lt.mjs
CHANGED
package/dist/lte.es.js
CHANGED
package/dist/lte.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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,isArray=Array.isArray,areAnyValuesPromises=function(r){if(isArray(r)){const e=r.length;let s=-1;for(;++s<e;){const e=r[s];if(isPromise(e))return!0}return!1}for(const e in r){const s=r[e];if(isPromise(s))return!0}return!1},__=Symbol.for("placeholder"),curry4ResolveArg0=(r,e,s,o)=>function(t){return r(t,e,s,o)},curry4ResolveArg1=(r,e,s,o)=>function(t){return r(e,t,s,o)},curry4ResolveArg2=(r,e,s,o)=>function(t){return r(e,s,t,o)},curry4ResolveArg3=(r,e,s,o)=>function(t){return r(e,s,o,t)},curry4=function(r,e,s,o,t){return e==__?curry4ResolveArg0(r,s,o,t):s==__?curry4ResolveArg1(r,e,o,t):o==__?curry4ResolveArg2(r,e,s,t):curry4ResolveArg3(r,e,s,o)},curryArgs4ResolveArgs0=(r,e,s,o)=>function(...t){return r(t,e,s,o)},curryArgs4ResolveArgs1=(r,e,s,o)=>function(...t){return r(e,t,s,o)},curryArgs4ResolveArgs2=(r,e,s,o)=>function(...t){return r(e,s,t,o)},curryArgs4ResolveArgs3=(r,e,s,o)=>function(...t){return r(e,s,o,t)},curryArgs4=function(r,e,s,o,t){return e==__?curryArgs4ResolveArgs0(r,s,o,t):s==__?curryArgs4ResolveArgs1(r,e,o,t):o==__?curryArgs4ResolveArgs2(r,e,s,t):curryArgs4ResolveArgs3(r,e,s,o)},spread2=r=>function([e,s]){return r(e,s)},promiseAll=Promise.all.bind(Promise),leftResolverRightResolverCompare=function(r,e,s,o){const t=s(...r),l=o(...r);return isPromise(t)||isPromise(l)?promiseAll([t,l]).then(spread2(e)):e(t,l)},leftResolverRightValueCompare=function(r,e,s,o){const t=s(...r);return isPromise(t)||isPromise(o)?promiseAll([t,o]).then(spread2(e)):e(t,o)},leftValueRightResolverCompare=function(r,e,s,o){const t=o(...r);return isPromise(s)||isPromise(t)?promiseAll([s,t]).then(spread2(e)):e(s,t)},ComparisonOperator=r=>function(...e){const s=e.pop(),o=e.pop(),t="function"==typeof o,l="function"==typeof s;return t&&l?0==e.length?curryArgs4(leftResolverRightResolverCompare,__,r,o,s):areAnyValuesPromises(e)?promiseAll(e).then(curry4(leftResolverRightResolverCompare,__,r,o,s)):leftResolverRightResolverCompare(e,r,o,s):t?0==e.length?curryArgs4(leftResolverRightValueCompare,__,r,o,s):areAnyValuesPromises(e)?promiseAll(e).then(curry4(leftResolverRightValueCompare,__,r,o,s)):leftResolverRightValueCompare(e,r,o,s):l?0==e.length?curryArgs4(leftValueRightResolverCompare,__,r,o,s):areAnyValuesPromises(e)?promiseAll(e).then(curry4(leftValueRightResolverCompare,__,r,o,s)):leftValueRightResolverCompare(e,r,o,s):isPromise(o)||isPromise(s)?promiseAll([o,s]).then(spread2(r)):r(o,s)},lessThanOrEqual=(r,e)=>r<=e,lte=ComparisonOperator(lessThanOrEqual);export default lte;
|
package/dist/lte.js
CHANGED
package/dist/lte.min.js
CHANGED
package/dist/lte.mjs
CHANGED
package/dist/map.es.js
CHANGED
package/dist/map.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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,symbolIterator=Symbol.iterator,MappingIterator=(r,t)=>({toString:()=>"[object MappingIterator]",[symbolIterator](){return this},next(){const e=r.next();return e.done?e:{value:t(e.value),done:!1}}}),NextIteration=r=>({value:r,done:!1}),symbolAsyncIterator=Symbol.asyncIterator,MappingAsyncIterator=(r,t)=>({[symbolAsyncIterator](){return this},async next(){const e=await r.next();if(e.done)return e;const n=t(e.value);return isPromise(n)?n.then(NextIteration):{value:n,done:!1}}}),__=Symbol.for("placeholder"),curry2ResolveArg0=(r,t)=>function(e){return r(e,t)},curry2ResolveArg1=(r,t)=>function(e){return r(t,e)},curry2=function(r,t,e){return t==__?curry2ResolveArg0(r,e):curry2ResolveArg1(r,t)},curry3ResolveArg0=(r,t,e)=>function(n){return r(n,t,e)},curry3ResolveArg1=(r,t,e)=>function(n){return r(t,n,e)},curry3ResolveArg2=(r,t,e)=>function(n){return r(t,e,n)},curry3=function(r,t,e,n){return t==__?curry3ResolveArg0(r,e,n):e==__?curry3ResolveArg1(r,t,n):curry3ResolveArg2(r,t,e)},isArray=Array.isArray,isObject=r=>{if(null==r)return!1;const t=typeof r;return"object"==t||"function"==t},promiseAll=Promise.all.bind(Promise),arrayMap=function(r,t){const e=r.length,n=Array(e);let o=-1,s=!1;for(;++o<e;){const e=t(r[o],o,r);isPromise(e)&&(s=!0),n[o]=e}return s?promiseAll(n):n},callPropUnary=(r,t,e)=>r[t](e),stringMap=function(r,t){const e=arrayMap(r,t);return isPromise(e)?e.then(curry3(callPropUnary,__,"join","")):e.join("")},always=r=>function(){return r},setMap=function(r,t){const e=new Set,n=[];for(const o of r){const s=t(o,o,r);isPromise(s)?n.push(s.then(curry3(callPropUnary,e,"add",__))):e.add(s)}return 0==n.length?e:promiseAll(n).then(always(e))},curry4ResolveArg0=(r,t,e,n)=>function(o){return r(o,t,e,n)},curry4ResolveArg1=(r,t,e,n)=>function(o){return r(t,o,e,n)},curry4ResolveArg2=(r,t,e,n)=>function(o){return r(t,e,o,n)},curry4ResolveArg3=(r,t,e,n)=>function(o){return r(t,e,n,o)},curry4=function(r,t,e,n,o){return t==__?curry4ResolveArg0(r,e,n,o):e==__?curry4ResolveArg1(r,t,n,o):n==__?curry4ResolveArg2(r,t,e,o):curry4ResolveArg3(r,t,e,n)},callPropBinary=(r,t,e,n)=>r[t](e,n),mapMap=function(r,t){const e=new Map,n=[];for(const[o,s]of r){const i=t(s,o,r);isPromise(i)?n.push(i.then(curry4(callPropBinary,e,"set",o,__))):e.set(o,i)}return 0==n.length?e:promiseAll(n).then(always(e))},promiseObjectAllExecutor=r=>function(t){const e={};let n=0;for(const o in r){const s=r[o];isPromise(s)?(n+=1,s.then((r=>function(o){e[r]=o,n-=1,0==n&&t(e)})(o))):e[o]=s}0==n&&t(e)},promiseObjectAll=r=>new Promise(promiseObjectAllExecutor(r)),objectMap=function(r,t){const e={};let n=!1;for(const o in r){const s=t(r[o],o,r);isPromise(s)&&(n=!0),e[o]=s}return n?promiseObjectAll(e):e},funcConcat=(r,t)=>function(...e){const n=r(...e);return isPromise(n)?n.then(t):t(n)},objectSet=function(r,t,e){return r[t]=e,r},arrayMapSeriesAsync=async function(r,t,e,n){const o=r.length;for(;++n<o;){const o=t(r[n],n);e[n]=isPromise(o)?await o:o}return e},arrayMapSeries=function(r,t){const e=r.length,n=Array(e);let o=-1;for(;++o<e;){const e=t(r[o],o);if(isPromise(e))return e.then(funcConcat(curry3(objectSet,n,o,__),curry4(arrayMapSeriesAsync,r,t,__,o)));n[o]=e}return n},stringMapSeries=function(r,t){const e=arrayMapSeries(r,t);return isPromise(e)?e.then(curry3(callPropUnary,__,"join","")):e.join("")},thunkify4=(r,t,e,n,o)=>function(){return r(t,e,n,o)},_objectMapSeriesAsync=async function(r,t,e,n){for(const o in r){if(o in n)continue;let s=t(r[o]);isPromise(s)&&(s=await s),e[o]=s}return e},objectMapSeries=function(r,t){const e={},n={};for(const o in r){n[o]=!0;const s=t(r[o],o,r);if(isPromise(s))return s.then(funcConcat(curry3(objectSet,e,o,__),thunkify4(_objectMapSeriesAsync,r,t,e,n)));e[o]=s}return e},thunkify3=(r,t,e,n)=>function(){return r(t,e,n)},setAdd=function(r,t){return r.add(t),r},_setMapSeriesAsync=async function(r,t,e){let n=r.next();for(;!n.done;){let o=t(n.value);isPromise(o)&&(o=await o),e.add(o),n=r.next()}return e},setMapSeries=function(r,t){const e=new Set,n=r[symbolIterator]();let o=n.next();for(;!o.done;){const r=t(o.value);if(isPromise(r))return r.then(funcConcat(curry2(setAdd,e,__),thunkify3(_setMapSeriesAsync,n,t,e)));e.add(r),o=n.next()}return e},mapSet=function(r,t,e){return r.set(t,e)},_mapMapSeriesAsync=async function(r,t,e){let n=r.next();for(;!n.done;){let o=t(n.value[1]);isPromise(o)&&(o=await o),e.set(n.value[0],o),n=r.next()}return e},mapMapSeries=function(r,t){const e=new Map,n=r[symbolIterator]();let o=n.next();for(;!o.done;){const r=o.value[0],s=t(o.value[1]);if(isPromise(s))return s.then(funcConcat(curry3(mapSet,e,r,__),thunkify3(_mapMapSeriesAsync,n,t,e)));e.set(r,s),o=n.next()}return e},tapSync=r=>function(...t){return r(...t),t[0]},promiseRace=Promise.race.bind(Promise),arrayMapPoolAsync=async function(r,t,e,n,o,s){const i=r.length;for(;++o<i;){s.size>=e&&await promiseRace(s);const i=t(r[o]);if(isPromise(i)){const r=i.then(tapSync((()=>s.delete(r))));s.add(r),n[o]=r}else n[o]=i}return promiseAll(n)},arrayMapPool=function(r,t,e){const n=r.length,o=Array(n);let s=-1;for(;++s<n;){const n=e(r[s]);if(isPromise(n)){const i=new Set,c=n.then(tapSync((()=>i.delete(c))));return i.add(c),o[s]=c,arrayMapPoolAsync(r,e,t,o,s,i)}o[s]=n}return o},stringMapPool=function(r,t,e){const n=arrayMapPool(r,t,e);return isPromise(n)?n.then(curry3(callPropUnary,__,"join","")):n.join("")},_setMapPoolAsync=async function(r,t,e,n,o,s){let i=t.next();for(;!i.done;){s.size>=e&&await promiseRace(s);const c=n(i.value,i.value,r);if(isPromise(c)){const r=c.then((t=>{s.delete(r),o.add(t)}));s.add(r)}else o.add(c);i=t.next()}return s.size>0&&await promiseAll(s),o},setMapPool=function(r,t,e){const n=new Set,o=r[symbolIterator]();let s=o.next();for(;!s.done;){const i=e(s.value,s.value,r);if(isPromise(i)){const s=new Set,c=i.then((r=>{s.delete(c),n.add(r)}));return s.add(c),_setMapPoolAsync(r,o,t,e,n,s)}n.add(i),s=o.next()}return n},_mapMapPoolAsync=async function(r,t,e,n,o,s){let i=t.next();for(;!i.done;){s.size>=e&&await promiseRace(s);const c=i.value[0],a=n(i.value[1],c,r);if(isPromise(a)){o.set(c,a);const r=a.then((t=>{s.delete(r),o.set(c,t)}));s.add(r)}else o.set(c,a);i=t.next()}return s.size>0&&await promiseAll(s),o},mapMapPool=function(r,t,e){const n=new Map,o=r[symbolIterator]();let s=o.next();for(;!s.done;){const i=s.value[0],c=e(s.value[1],i,r);if(isPromise(c)){const s=new Set;n.set(i,c);const a=c.then((r=>{s.delete(a),n.set(i,r)}));return s.add(a),_mapMapPoolAsync(r,o,t,e,n,s)}n.set(i,c),s=o.next()}return n},_objectMapPoolAsync=async function(r,t,e,n,o,s){for(const i in r){if(i in o)continue;s.size>=t&&await promiseRace(s);const c=e(r[i],i,r);if(isPromise(c)){n[i]=c;const r=c.then((t=>{s.delete(r),n[i]=t}));s.add(r)}else n[i]=c}return s.size>0&&await promiseAll(s),n},objectMapPool=function(r,t,e){const n={},o={};for(const s in r){o[s]=!0;const i=e(r[s],s,r);if(isPromise(i)){const c=new Set;n[s]=i;const a=i.then((r=>{c.delete(a),n[s]=r}));return c.add(a),_objectMapPoolAsync(r,t,e,n,o,c)}n[s]=i}return n},_curryArity=(r,t,e)=>function(...n){const o=e.length,s=n.length,i=[];let c=-1,a=-1,u=0;for(;++c<o;){const o=e[c];if(o==__&&(a+=1)<s){const r=n[a];r==__&&(u+=1),i.push(r)}else i.push(o);if(i.length==r)return 0==u?t(...i):curryArity(r,t,i)}for(;++a<s;){const e=n[a];if(e==__&&(u+=1),i.push(e),i.length==r)return 0==u?t(...i):curryArity(r,t,i)}return curryArity(r,t,i)},curryArity=function(r,t,e){const n=e.length;if(n<r)return _curryArity(r,t,e);let o=-1;for(;++o<n;){if(e[o]==__)return _curryArity(r,t,e)}return t(...e)},spread2=r=>function([t,e]){return r(t,e)},objectMapEntries=function(r,t){const e={},n=[];for(const o in r){const s=t([o,r[o]]);isPromise(s)?n.push(s.then(spread2(curryArity(3,objectSet,[e])))):e[s[0]]=s[1]}return 0==n.length?e:promiseAll(n).then(always(e))},mapMapEntriesForEachCallback=(r,t,e)=>function(n,o){const s=r([o,n]);isPromise(s)?e.push(s.then(spread2(curryArity(3,mapSet,[t])))):t.set(s[0],s[1])},mapMapEntries=function(r,t){const e=new Map,n=[];return r.forEach(mapMapEntriesForEachCallback(t,e,n)),0==n.length?e:promiseAll(n).then(always(e))},_map=function(r,t){return isArray(r)?arrayMap(r,t):null==r?r:"function"==typeof r.then?r.then(t):"function"==typeof r.map?r.map(t):"string"==typeof r||r.constructor==String?stringMap(r,t):r.constructor==Set?setMap(r,t):r.constructor==Map?mapMap(r,t):"function"==typeof r[symbolIterator]?MappingIterator(r[symbolIterator](),t):"function"==typeof r[symbolAsyncIterator]?MappingAsyncIterator(r[symbolAsyncIterator](),t):r.constructor==Object?objectMap(r,t):t(r)},map=function(r,t){return null==t?curry2(_map,__,r):isPromise(r)?r.then(curry2(_map,__,t)):_map(r,t)},_mapEntries=(r,t)=>{if(null==r)throw new TypeError("value is not an Object or Map");if(r.constructor==Object)return objectMapEntries(r,t);if(r.constructor==Map)return mapMapEntries(r,t);throw new TypeError("value is not an Object or Map")};map.entries=function(r,t){return null==t?curry2(_mapEntries,__,r):isPromise(r)?r.then(curry2(_mapEntries,__,t)):_mapEntries(r,t)};const _mapSeries=function(r,t){if(isArray(r))return arrayMapSeries(r,t);if(null==r)throw new TypeError(`invalid collection ${r}`);if("string"==typeof r||r.constructor==String)return stringMapSeries(r,t);if(r.constructor==Set)return setMapSeries(r,t);if(r.constructor==Map)return mapMapSeries(r,t);if(r.constructor==Object)return objectMapSeries(r,t);throw new TypeError(`invalid collection ${r}`)};map.series=function(r,t){return null==t?curry2(_mapSeries,__,r):isPromise(r)?r.then(curry2(_mapSeries,__,t)):_mapSeries(r,t)};const _mapPool=function(r,t,e){if(isArray(r))return arrayMapPool(r,t,e);if(null==r)throw new TypeError(`invalid functor ${r}`);if("string"==typeof r||r.constructor==String)return stringMapPool(r,t,e);if(r.constructor==Set)return setMapPool(r,t,e);if(r.constructor==Map)return mapMapPool(r,t,e);if(r.constructor==Object)return objectMapPool(r,t,e);throw new TypeError(`invalid functor ${r}`)};map.pool=function(r,t,e){return null==e?curry3(_mapPool,__,r,t):isPromise(r)?r.then(curry3(_mapPool,__,t,e)):_mapPool(r,t,e)};export default map;
|
package/dist/map.js
CHANGED
package/dist/map.min.js
CHANGED
package/dist/map.mjs
CHANGED
package/dist/not.es.js
CHANGED
package/dist/not.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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,areAnyValuesPromises=function(r){if(isArray(r)){const e=r.length;let n=-1;for(;++n<e;){const e=r[n];if(isPromise(e))return!0}return!1}for(const e in r){const n=r[e];if(isPromise(n))return!0}return!1},promiseAll=Promise.all.bind(Promise),__=Symbol.for("placeholder"),curry2ResolveArg0=(r,e)=>function(n){return r(n,e)},curry2ResolveArg1=(r,e)=>function(n){return r(e,n)},curry2=function(r,e,n){return e==__?curry2ResolveArg0(r,n):curry2ResolveArg1(r,e)},curryArgs2ResolveArgs0=(r,e,n)=>function(...n){return r(n,e)},curryArgs2ResolveArgs1=(r,e,n)=>function(...n){return r(e,n)},curryArgs2=function(r,e,n){return e==__?curryArgs2ResolveArgs0(r,n):curryArgs2ResolveArgs1(r,e)},negate=r=>!r,_not=function(r,e){const n=e(...r);return isPromise(n)?n.then(negate):!n},not=function(...r){const e=r.pop();return"function"==typeof e?0==r.length?curryArgs2(_not,__,e):areAnyValuesPromises(r)?promiseAll(r).then(curry2(_not,__,e)):_not(r,e):isPromise(e)?e.then(negate):!e};export default not;
|
package/dist/not.js
CHANGED
package/dist/not.min.js
CHANGED
package/dist/not.mjs
CHANGED
package/dist/omit.es.js
CHANGED
package/dist/omit.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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=e=>null!=e&&"function"==typeof e.then,isArray=Array.isArray,memoizeCappedUnary=function(e,r){const t=new Map,o=function(o){if(t.has(o))return t.get(o);const n=e(o);return t.set(o,n),t.size>r&&t.clear(),n};return o.cache=t,o},pathDelimiters=/[.|[|\]]+/,parsePropertyPath=function(e){const r=e.length-1,t="["==e[0],o="]"==e[r];return t&&o?e.slice(1,r).split(pathDelimiters):t?e.slice(1).split(pathDelimiters):o?e.slice(0,r).split(pathDelimiters):e.split(pathDelimiters)},memoizedCappedParsePropertyPath=memoizeCappedUnary(parsePropertyPath,500),propertyPathToArray=e=>isArray(e)?e:"string"==typeof e?memoizedCappedParsePropertyPath(e):[e],getByPath=function(e,r){const t=propertyPathToArray(r),o=t.length;let n=-1,i=e;for(;++n<o;)if(i=i[t[n]],null==i)return;return i},deleteByPath=function(e,r){if(null==e)return;const t=propertyPathToArray(r),o=t.length-1;let n=-1,i=e;for(;++n<o;)if(i=i[t[n]],null==i)return;const c=t[n];null!=i&&c in i&&delete i[c]},objectCopyDeep=function(e){const r={};for(const t in e){const o=e[t];isArray(o)?r[t]=arrayCopyDeep(o):null!=o&&o.constructor==Object?r[t]=objectCopyDeep(o):r[t]=o}return r},arrayCopyDeep=function(e){const r=e.length,t=[];let o=-1;for(;++o<r;){const r=e[o];isArray(r)?t[o]=arrayCopyDeep(r):null!=r&&r.constructor==Object?t[o]=objectCopyDeep(r):t[o]=r}return t},copyDeep=function(e){return isArray(e)?arrayCopyDeep(e):null==e?e:e.constructor==Object?objectCopyDeep(e):e},__=Symbol.for("placeholder"),curry2ResolveArg0=(e,r)=>function(t){return e(t,r)},curry2ResolveArg1=(e,r)=>function(t){return e(r,t)},curry2=function(e,r,t){return r==__?curry2ResolveArg0(e,t):curry2ResolveArg1(e,r)},_omit=function(e,r){const t=r.length,o=copyDeep(e);let n=-1;for(;++n<t;)deleteByPath(o,r[n]);return o},omit=function(e,r){return null==r?curry2(_omit,__,e):isPromise(e)?e.then(curry2(_omit,__,r)):_omit(e,r)};export default omit;
|
package/dist/omit.js
CHANGED
package/dist/omit.min.js
CHANGED
package/dist/omit.mjs
CHANGED
package/dist/or.es.js
CHANGED
package/dist/or.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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 promiseAll=Promise.all.bind(Promise),isPromise=r=>null!=r&&"function"==typeof r.then,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},__=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)},thunkConditional=(r,n,e)=>r?n():e(),areAllValuesNonfunctions=function(r){if(isArray(r)){const n=r.length;let e=-1;for(;++e<n;)if("function"==typeof r[e])return!1;return!0}for(const n in r)if("function"==typeof r[n])return!1;return!0},thunkify2=(r,n,e)=>function(){return r(n,e)},thunkify3=(r,n,e,t)=>function(){return r(n,e,t)},always=r=>function(){return r},areAnyNonfunctionsTruthy=function(r,n){const e=r.length;for(;++n<e;){const e=r[n];if(isPromise(e))return e.then(curry3(thunkConditional,__,always(!0),thunkify2(areAnyNonfunctionsTruthy,r,n)));if(e)return!0}return!1},asyncAreAnyPredicatesTruthy=async function(r,n,e){const t=n.length;for(;++e<t;){let t=n[e];if("function"==typeof t&&(t=t(...r)),isPromise(t)&&(t=await t),t)return!0}return!1},areAnyPredicatesTruthy=function(r,n){const e=n.length;let t=-1;for(;++t<e;){let e=n[t];if("function"==typeof e&&(e=e(...r)),isPromise(e))return e.then(curry3(thunkConditional,__,always(!0),thunkify3(asyncAreAnyPredicatesTruthy,r,n,t)));if(e)return!0}return!1},or=function(...r){const n=r.pop();return areAllValuesNonfunctions(n)?areAnyNonfunctionsTruthy(n,-1):0==r.length?curryArgs2(areAnyPredicatesTruthy,__,n):areAnyValuesPromises(r)?promiseAll(r).then(curry2(areAnyPredicatesTruthy,__,n)):areAnyPredicatesTruthy(r,n)};export default or;
|
package/dist/or.js
CHANGED
package/dist/or.min.js
CHANGED
package/dist/or.mjs
CHANGED
package/dist/pick.es.js
CHANGED
package/dist/pick.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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,isArray=Array.isArray,memoizeCappedUnary=function(r,t){const e=new Map,n=function(n){if(e.has(n))return e.get(n);const i=r(n);return e.set(n,i),e.size>t&&e.clear(),i};return n.cache=e,n},pathDelimiters=/[.|[|\]]+/,parsePropertyPath=function(r){const t=r.length-1,e="["==r[0],n="]"==r[t];return e&&n?r.slice(1,t).split(pathDelimiters):e?r.slice(1).split(pathDelimiters):n?r.slice(0,t).split(pathDelimiters):r.split(pathDelimiters)},memoizedCappedParsePropertyPath=memoizeCappedUnary(parsePropertyPath,500),propertyPathToArray=r=>isArray(r)?r:"string"==typeof r?memoizedCappedParsePropertyPath(r):[r],getByPath=function(r,t){const e=propertyPathToArray(t),n=e.length;let i=-1,o=r;for(;++i<n;)if(o=o[e[i]],null==o)return;return o},isObject=r=>{if(null==r)return!1;const t=typeof r;return"object"==t||"function"==t},setByPath=function(r,t,e){if(!isObject(r))return r;const n=propertyPathToArray(e),i=n.length,o=i-1,s={...r};let c=s,l=-1;for(;++l<i;){const r=n[l];if(l==o)c[r]=t;else{const t=c[r],e=isArray(t)?t.slice():{...t};c[r]=e,c=e}}return s},__=Symbol.for("placeholder"),curry2ResolveArg0=(r,t)=>function(e){return r(e,t)},curry2ResolveArg1=(r,t)=>function(e){return r(t,e)},curry2=function(r,t,e){return t==__?curry2ResolveArg0(r,e):curry2ResolveArg1(r,t)},_pick=function(r,t){if(null==r)return r;const e=t.length;let n={},i=-1;for(;++i<e;){const e=t[i],o=getByPath(r,e);null!=o&&(n=setByPath(n,o,e))}return n},pick=function(r,t){return null==t?curry2(_pick,__,r):isPromise(r)?r.then(curry2(_pick,__,t)):_pick(r,t)};export default pick;
|
package/dist/pick.js
CHANGED
package/dist/pick.min.js
CHANGED
package/dist/pick.mjs
CHANGED
package/dist/pipe.es.js
CHANGED
package/dist/pipe.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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,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),funcConcat=(r,n)=>function(...e){const o=r(...e);return isPromise(o)?o.then(n):n(o)},funcApply=(r,n)=>r(...n),__=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)},pipe=function(...r){if("function"==typeof r[0])return r.reduce(funcConcat);const n=r.pop().reduce(funcConcat);return 0==r.length?n:areAnyValuesPromises(r)?promiseAll(r).then(curry2(funcApply,n,__)):n(...r)};export default pipe;
|
package/dist/pipe.js
CHANGED
package/dist/pipe.min.js
CHANGED
package/dist/pipe.mjs
CHANGED
package/dist/reduce.es.js
CHANGED
package/dist/reduce.es.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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,__=Symbol.for("placeholder"),curry3ResolveArg0=(r,e,n)=>function(t){return r(t,e,n)},curry3ResolveArg1=(r,e,n)=>function(t){return r(e,t,n)},curry3ResolveArg2=(r,e,n)=>function(t){return r(e,n,t)},curry3=function(r,e,n,t){return e==__?curry3ResolveArg0(r,n,t):n==__?curry3ResolveArg1(r,e,t):curry3ResolveArg2(r,e,n)},isArray=Array.isArray,objectValues=Object.values,objectProto=Object.prototype,nativeObjectToString=objectProto.toString,objectToString=r=>nativeObjectToString.call(r),generatorFunctionTag="[object GeneratorFunction]",isGeneratorFunction=r=>objectToString(r)==generatorFunctionTag,asyncGeneratorFunctionTag="[object AsyncGeneratorFunction]",isAsyncGeneratorFunction=r=>objectToString(r)==asyncGeneratorFunctionTag,iteratorReduceAsync=async function(r,e,n){let t=r.next();if(t.done)return n;for(;!t.done;)n=e(n,t.value),isPromise(n)&&(n=await n),t=r.next();return n},iteratorReduce=function(r,e,n){let t=r.next();if(t.done)return n;for(void 0===n&&(n=t.value,t=r.next());!t.done;){if(n=e(n,t.value),isPromise(n))return n.then(curry3(iteratorReduceAsync,r,e,__));t=r.next()}return n},asyncIteratorReduce=async function(r,e,n){let t=await r.next();if(t.done)return n;for(void 0===n&&(n=t.value,t=await r.next());!t.done;)n=await e(n,t.value),t=await r.next();return n},symbolIterator=Symbol.iterator,symbolAsyncIterator=Symbol.asyncIterator,curry2ResolveArg0=(r,e)=>function(n){return r(n,e)},curry2ResolveArg1=(r,e)=>function(n){return r(e,n)},curry2=function(r,e,n){return e==__?curry2ResolveArg0(r,n):curry2ResolveArg1(r,e)},curryArgs3ResolveArgs0=(r,e,n)=>function(...t){return r(t,e,n)},curryArgs3ResolveArgs1=(r,e,n)=>function(...t){return r(e,t,n)},curryArgs3ResolveArgs2=(r,e,n)=>function(...t){return r(e,n,t)},curryArgs3=function(r,e,n,t){return e==__?curryArgs3ResolveArgs0(r,n,t):n==__?curryArgs3ResolveArgs1(r,e,t):curryArgs3ResolveArgs2(r,e,n)},curry4ResolveArg0=(r,e,n,t)=>function(o){return r(o,e,n,t)},curry4ResolveArg1=(r,e,n,t)=>function(o){return r(e,o,n,t)},curry4ResolveArg2=(r,e,n,t)=>function(o){return r(e,n,o,t)},curry4ResolveArg3=(r,e,n,t)=>function(o){return r(e,n,t,o)},curry4=function(r,e,n,t,o){return e==__?curry4ResolveArg0(r,n,t,o):n==__?curry4ResolveArg1(r,e,t,o):t==__?curry4ResolveArg2(r,e,n,o):curry4ResolveArg3(r,e,n,t)},arrayReduceAsync=async function(r,e,n,t){const o=r.length;for(;++t<o;)n=e(n,r[t],t,r),isPromise(n)&&(n=await n);return n},arrayReduce=function(r,e,n){const t=r.length;let o=-1;for(void 0===n&&(n=r[++o]);++o<t;)if(n=e(n,r[o],o,r),isPromise(n))return n.then(curry4(arrayReduceAsync,r,e,__,o));return n},curry5ResolveArg0=(r,e,n,t,o)=>function(c){return r(c,e,n,t,o)},curry5ResolveArg1=(r,e,n,t,o)=>function(c){return r(e,c,n,t,o)},curry5ResolveArg2=(r,e,n,t,o)=>function(c){return r(e,n,c,t,o)},curry5ResolveArg3=(r,e,n,t,o)=>function(c){return r(e,n,t,c,o)},curry5ResolveArg4=(r,e,n,t,o)=>function(c){return r(e,n,t,o,c)},curry5=function(r,e,n,t,o,c){return e==__?curry5ResolveArg0(r,n,t,o,c):n==__?curry5ResolveArg1(r,e,t,o,c):t==__?curry5ResolveArg2(r,e,n,o,c):o==__?curry5ResolveArg3(r,e,n,t,c):curry5ResolveArg4(r,e,n,t,o)},objectKeys=Object.keys,objectReduceAsync=async function(r,e,n,t,o){const c=t.length;for(;++o<c;){const c=t[o];n=e(n,r[c],c,r),isPromise(n)&&(n=await n)}return n},objectReduce=function(r,e,n){const t=objectKeys(r),o=t.length;let c=-1;for(void 0===n&&(n=r[t[++c]]);++c<o;){const o=t[c];if(n=e(n,r[o],o,r),isPromise(n))return n.then(curry5(objectReduceAsync,r,e,__,t,c))}return n},mapReduceAsync=async function(r,e,n,t){for(const[o,c]of t)n=e(n,c,o,r),isPromise(n)&&(n=await n);return n},mapReduce=function(r,e,n){const t=r.entries();if(void 0===n){const r=t.next();if(r.done)return n;n=r.value[1]}for(const[o,c]of t)if(n=e(n,c,o,r),isPromise(n))return n.then(curry4(mapReduceAsync,r,e,__,t));return n},reducerConcat=(r,e)=>function(n,t){const o=r(n,t);return isPromise(o)?o.then(curry2(e,__,t)):e(o,t)},genericReduce=function(r,e,n){return isArray(r)?arrayReduce(r,e,n):null==r?void 0===n?curry2(e,r,__):e(n,r):r.constructor==Map?mapReduce(r,e,n):"function"==typeof r[symbolIterator]?iteratorReduce(r[symbolIterator](),e,n):"function"==typeof r[symbolAsyncIterator]?asyncIteratorReduce(r[symbolAsyncIterator](),e,n):"function"==typeof r.reduce?r.reduce(e,n):"function"==typeof r.chain?r.chain(curry2(e,n,__)):"function"==typeof r.flatMap?r.flatMap(curry2(e,n,__)):r.constructor==Object?objectReduce(r,e,n):void 0===n?curry2(e,r,__):e(n,r)},_reduce=function(r,e,n){if("function"==typeof n){const t=n(r);return isPromise(t)?t.then(curry3(genericReduce,r,e,__)):genericReduce(r,e,t)}return isPromise(n)?n.then(curry3(genericReduce,r,e,__)):genericReduce(r,e,n)},reduce=function(...r){return"function"==typeof r[0]?curry3(_reduce,__,r[0],r[1]):isPromise(r[0])?r[0].then(curry3(_reduce,__,r[1],r[2])):_reduce(r[0],r[1],r[2])};export default reduce;
|
package/dist/reduce.js
CHANGED
package/dist/reduce.min.js
CHANGED
package/dist/reduce.mjs
CHANGED
package/dist/rubico.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.9
|
|
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
|
|
|
@@ -2258,7 +2258,7 @@ const arrayForEach = function (array, callback) {
|
|
|
2258
2258
|
promises = []
|
|
2259
2259
|
let index = -1
|
|
2260
2260
|
while (++index < length) {
|
|
2261
|
-
const operation = callback(array[index])
|
|
2261
|
+
const operation = callback(array[index], index, array)
|
|
2262
2262
|
if (isPromise(operation)) {
|
|
2263
2263
|
promises.push(operation)
|
|
2264
2264
|
}
|
|
@@ -2269,7 +2269,7 @@ const arrayForEach = function (array, callback) {
|
|
|
2269
2269
|
const objectForEach = function (object, callback) {
|
|
2270
2270
|
const promises = []
|
|
2271
2271
|
for (const key in object) {
|
|
2272
|
-
const operation = callback(object[key])
|
|
2272
|
+
const operation = callback(object[key], key, object)
|
|
2273
2273
|
if (isPromise(operation)) {
|
|
2274
2274
|
promises.push(operation)
|
|
2275
2275
|
}
|
|
@@ -2308,7 +2308,7 @@ const arrayForEachSeries = function (array, callback) {
|
|
|
2308
2308
|
const length = array.length
|
|
2309
2309
|
let index = -1
|
|
2310
2310
|
while (++index < length) {
|
|
2311
|
-
const operation = callback(array[index])
|
|
2311
|
+
const operation = callback(array[index], index, array)
|
|
2312
2312
|
if (isPromise(operation)) {
|
|
2313
2313
|
return operation
|
|
2314
2314
|
.then(thunkify3(_arrayForEachSeriesAsync, array, callback, index))
|
|
@@ -2339,7 +2339,7 @@ const objectForEachSeries = function (object, callback) {
|
|
|
2339
2339
|
const doneKeys = {}
|
|
2340
2340
|
for (const key in object) {
|
|
2341
2341
|
doneKeys[key] = true
|
|
2342
|
-
const operation = callback(object[key])
|
|
2342
|
+
const operation = callback(object[key], key, object)
|
|
2343
2343
|
if (isPromise(operation)) {
|
|
2344
2344
|
return operation
|
|
2345
2345
|
.then(thunkify3(_objectForEachSeriesAsync, object, callback, doneKeys))
|