rubico 2.7.3 → 2.7.5
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/LICENSE +1 -1
- package/README.md +27 -30
- package/Transducer.d.ts +10 -10
- package/Transducer.js +65 -69
- package/__.js +1 -1
- package/_internal/FlatMappingIterator.js +1 -1
- package/_internal/MappingIterator.d.ts +1 -1
- package/_internal/MappingIterator.js +1 -1
- package/_internal/arrayFilter.js +6 -6
- package/_internal/arrayFilterIndexes.js +7 -7
- package/_internal/arrayFilterWithIndex.js +6 -6
- package/_internal/arrayFind.js +7 -7
- package/_internal/arrayFlatten.js +25 -25
- package/_internal/arrayForEach.d.ts +1 -1
- package/_internal/arrayForEach.js +1 -1
- package/_internal/arrayForEachSeries.js +1 -1
- package/_internal/arrayMap.d.ts +2 -2
- package/_internal/arrayMap.js +5 -5
- package/_internal/arrayMapPool.d.ts +1 -1
- package/_internal/arrayMapPool.js +10 -10
- package/_internal/arrayMapRate.js +4 -4
- package/_internal/arrayMapSeries.d.ts +1 -1
- package/_internal/arrayMapSeries.js +8 -8
- package/_internal/arrayMapWithIndex.js +4 -4
- package/_internal/arrayReduce.js +1 -1
- package/_internal/asyncGeneratorFunctionForEach.js +3 -3
- package/_internal/asyncGeneratorFunctionMap.js +3 -3
- package/_internal/asyncIteratorFind.js +3 -3
- package/_internal/asyncIteratorForEach.d.ts +1 -1
- package/_internal/asyncIteratorForEach.js +3 -3
- package/_internal/asyncIteratorForEachSeries.js +3 -3
- package/_internal/asyncIteratorToArray.js +2 -2
- package/_internal/copyDeep.js +12 -12
- package/_internal/funcAll.js +3 -3
- package/_internal/funcAllSeries.js +6 -6
- package/_internal/funcObjectAll.js +4 -4
- package/_internal/functionArrayAll.js +3 -3
- package/_internal/functionArrayAllSeries.js +6 -6
- package/_internal/functionObjectAll.js +4 -4
- package/_internal/generatorFunctionForEach.js +3 -3
- package/_internal/generatorFunctionMap.js +3 -3
- package/_internal/generatorFunctionReduce.js +1 -1
- package/_internal/iteratorEvery.js +2 -2
- package/_internal/iteratorFind.js +7 -7
- package/_internal/iteratorForEach.d.ts +1 -1
- package/_internal/iteratorForEach.js +3 -3
- package/_internal/iteratorForEachSeries.js +1 -1
- package/_internal/iteratorReduce.d.ts +1 -1
- package/_internal/iteratorReduce.js +2 -2
- package/_internal/iteratorSome.js +2 -2
- package/_internal/mapFilter.js +4 -4
- package/_internal/mapMap.d.ts +1 -1
- package/_internal/mapMap.js +6 -6
- package/_internal/mapMapPool.js +10 -10
- package/_internal/mapMapSeries.js +10 -10
- package/_internal/objectFilter.js +6 -6
- package/_internal/objectFlatMap.d.ts +1 -1
- package/_internal/objectFlatMap.js +1 -1
- package/_internal/objectFlatten.js +14 -14
- package/_internal/objectMap.js +3 -3
- package/_internal/objectMapOwn.js +3 -3
- package/_internal/objectMapPool.js +10 -10
- package/_internal/objectMapSeries.js +9 -9
- package/_internal/objectReduce.d.ts +1 -1
- package/_internal/objectReduce.js +2 -2
- package/_internal/reducerAllSync.d.ts +2 -2
- package/_internal/reducerAllSync.js +2 -2
- package/_internal/reducerAnySync.d.ts +1 -1
- package/_internal/reducerAnySync.js +2 -2
- package/_internal/reducerConcat.d.ts +1 -1
- package/_internal/reducerConcat.js +4 -4
- package/_internal/reducerConcatSync.js +2 -2
- package/_internal/reducerEvery.d.ts +2 -2
- package/_internal/reducerEvery.js +4 -4
- package/_internal/reducerFilter.d.ts +2 -2
- package/_internal/reducerFilter.js +5 -5
- package/_internal/reducerFlatten.js +3 -3
- package/_internal/reducerForEach.d.ts +2 -2
- package/_internal/reducerForEach.js +5 -5
- package/_internal/reducerMap.d.ts +1 -1
- package/_internal/reducerMap.js +5 -5
- package/_internal/reducerSome.d.ts +2 -2
- package/_internal/reducerSome.js +4 -4
- package/_internal/reducerTryCatch.d.ts +2 -2
- package/_internal/reducerTryCatch.js +8 -8
- package/_internal/setFilter.d.ts +1 -1
- package/_internal/setFilter.js +5 -5
- package/_internal/setFlatten.js +24 -24
- package/_internal/setMap.d.ts +1 -1
- package/_internal/setMap.js +6 -6
- package/_internal/setMapPool.js +9 -9
- package/_internal/setMapSeries.js +10 -10
- package/_internal/streamFlatExtend.js +25 -25
- package/_internal/streamFlatMap.js +2 -2
- package/all.js +3 -3
- package/and.js +5 -2
- package/assign.js +2 -2
- package/compose.js +6 -2
- package/curry.js +5 -12
- package/dist/Transducer.es.js +24 -24
- package/dist/Transducer.es.min.js +1 -1
- package/dist/Transducer.js +24 -24
- package/dist/Transducer.min.js +1 -1
- package/dist/Transducer.mjs +24 -24
- package/dist/__.es.js +1 -1
- package/dist/__.es.min.js +1 -1
- package/dist/__.js +1 -1
- package/dist/__.min.js +1 -1
- package/dist/__.mjs +1 -1
- package/dist/all.es.js +14 -14
- package/dist/all.es.min.js +1 -1
- package/dist/all.js +14 -14
- package/dist/all.min.js +1 -1
- package/dist/all.mjs +14 -14
- package/dist/always.es.js +1 -1
- package/dist/always.es.min.js +1 -1
- package/dist/always.js +1 -1
- package/dist/always.min.js +1 -1
- package/dist/always.mjs +1 -1
- package/dist/and.es.js +1 -1
- package/dist/and.es.min.js +1 -1
- package/dist/and.js +1 -1
- package/dist/and.min.js +1 -1
- package/dist/and.mjs +1 -1
- package/dist/assign.es.js +5 -5
- package/dist/assign.es.min.js +1 -1
- package/dist/assign.js +5 -5
- package/dist/assign.min.js +1 -1
- package/dist/assign.mjs +5 -5
- package/dist/compose.es.js +1 -1
- package/dist/compose.es.min.js +1 -1
- package/dist/compose.js +1 -1
- package/dist/compose.min.js +1 -1
- package/dist/compose.mjs +1 -1
- package/dist/curry.es.js +1 -1
- package/dist/curry.es.min.js +1 -1
- package/dist/curry.js +1 -1
- package/dist/curry.min.js +1 -1
- package/dist/curry.mjs +1 -1
- package/dist/eq.es.js +1 -1
- package/dist/eq.es.min.js +1 -1
- package/dist/eq.js +1 -1
- package/dist/eq.min.js +1 -1
- package/dist/eq.mjs +1 -1
- package/dist/every.es.js +7 -7
- package/dist/every.es.min.js +1 -1
- package/dist/every.js +7 -7
- package/dist/every.min.js +1 -1
- package/dist/every.mjs +7 -7
- package/dist/filter.es.js +21 -21
- package/dist/filter.es.min.js +1 -1
- package/dist/filter.js +21 -21
- package/dist/filter.min.js +1 -1
- package/dist/filter.mjs +21 -21
- package/dist/flatMap.es.js +82 -82
- package/dist/flatMap.es.min.js +1 -1
- package/dist/flatMap.js +82 -82
- package/dist/flatMap.min.js +1 -1
- package/dist/flatMap.mjs +82 -82
- package/dist/forEach.es.js +7 -7
- package/dist/forEach.es.min.js +1 -1
- package/dist/forEach.js +7 -7
- package/dist/forEach.min.js +1 -1
- package/dist/forEach.mjs +7 -7
- package/dist/get.es.js +1 -1
- package/dist/get.es.min.js +1 -1
- package/dist/get.js +1 -1
- package/dist/get.min.js +1 -1
- package/dist/get.mjs +1 -1
- package/dist/gt.es.js +1 -1
- package/dist/gt.es.min.js +1 -1
- package/dist/gt.js +1 -1
- package/dist/gt.min.js +1 -1
- package/dist/gt.mjs +1 -1
- package/dist/gte.es.js +1 -1
- package/dist/gte.es.min.js +1 -1
- package/dist/gte.js +1 -1
- package/dist/gte.min.js +1 -1
- package/dist/gte.mjs +1 -1
- package/dist/lt.es.js +1 -1
- package/dist/lt.es.min.js +1 -1
- package/dist/lt.js +1 -1
- package/dist/lt.min.js +1 -1
- package/dist/lt.mjs +1 -1
- package/dist/lte.es.js +1 -1
- package/dist/lte.es.min.js +1 -1
- package/dist/lte.js +1 -1
- package/dist/lte.min.js +1 -1
- package/dist/lte.mjs +1 -1
- package/dist/map.es.js +83 -83
- package/dist/map.es.min.js +1 -1
- package/dist/map.js +83 -83
- package/dist/map.min.js +1 -1
- package/dist/map.mjs +83 -83
- package/dist/not.es.js +1 -1
- package/dist/not.es.min.js +1 -1
- package/dist/not.js +1 -1
- package/dist/not.min.js +1 -1
- package/dist/not.mjs +1 -1
- package/dist/omit.es.js +13 -13
- package/dist/omit.es.min.js +1 -1
- package/dist/omit.js +13 -13
- package/dist/omit.min.js +1 -1
- package/dist/omit.mjs +13 -13
- package/dist/or.es.js +1 -1
- package/dist/or.es.min.js +1 -1
- package/dist/or.js +1 -1
- package/dist/or.min.js +1 -1
- package/dist/or.mjs +1 -1
- package/dist/pick.es.js +1 -1
- package/dist/pick.es.min.js +1 -1
- package/dist/pick.js +1 -1
- package/dist/pick.min.js +1 -1
- package/dist/pick.mjs +1 -1
- package/dist/pipe.es.js +1 -1
- package/dist/pipe.es.min.js +1 -1
- package/dist/pipe.js +1 -1
- package/dist/pipe.min.js +1 -1
- package/dist/pipe.mjs +1 -1
- package/dist/reduce.es.js +5 -5
- package/dist/reduce.es.min.js +1 -1
- package/dist/reduce.js +5 -5
- package/dist/reduce.min.js +1 -1
- package/dist/reduce.mjs +5 -5
- package/dist/rubico.es.js +215 -215
- package/dist/rubico.es.min.js +1 -1
- package/dist/rubico.global.js +215 -215
- package/dist/rubico.global.min.js +1 -1
- package/dist/rubico.js +215 -215
- package/dist/rubico.min.js +1 -1
- package/dist/rubico.mjs +215 -215
- package/dist/set.es.js +1 -1
- package/dist/set.es.min.js +1 -1
- package/dist/set.js +1 -1
- package/dist/set.min.js +1 -1
- package/dist/set.mjs +1 -1
- package/dist/some.es.js +8 -8
- package/dist/some.es.min.js +1 -1
- package/dist/some.js +8 -8
- package/dist/some.min.js +1 -1
- package/dist/some.mjs +8 -8
- package/dist/switchCase.es.js +1 -1
- package/dist/switchCase.es.min.js +1 -1
- package/dist/switchCase.js +1 -1
- package/dist/switchCase.min.js +1 -1
- package/dist/switchCase.mjs +1 -1
- package/dist/tap.es.js +1 -1
- package/dist/tap.es.min.js +1 -1
- package/dist/tap.js +1 -1
- package/dist/tap.min.js +1 -1
- package/dist/tap.mjs +1 -1
- package/dist/thunkify.es.js +1 -1
- package/dist/thunkify.es.min.js +1 -1
- package/dist/thunkify.js +1 -1
- package/dist/thunkify.min.js +1 -1
- package/dist/thunkify.mjs +1 -1
- package/dist/transform.es.js +5 -5
- package/dist/transform.es.min.js +1 -1
- package/dist/transform.js +5 -5
- package/dist/transform.min.js +1 -1
- package/dist/transform.mjs +5 -5
- package/dist/tryCatch.es.js +1 -1
- package/dist/tryCatch.es.min.js +1 -1
- package/dist/tryCatch.js +1 -1
- package/dist/tryCatch.min.js +1 -1
- package/dist/tryCatch.mjs +1 -1
- package/dist/x/append.es.js +8 -8
- package/dist/x/append.es.min.js +1 -1
- package/dist/x/append.js +8 -8
- package/dist/x/append.min.js +1 -1
- package/dist/x/append.mjs +8 -8
- package/dist/x/callProp.es.js +1 -1
- package/dist/x/callProp.es.min.js +1 -1
- package/dist/x/callProp.js +1 -1
- package/dist/x/callProp.min.js +1 -1
- package/dist/x/callProp.mjs +1 -1
- package/dist/x/defaultsDeep.es.js +69 -37
- package/dist/x/defaultsDeep.es.min.js +2 -2
- package/dist/x/defaultsDeep.js +69 -37
- package/dist/x/defaultsDeep.min.js +2 -2
- package/dist/x/defaultsDeep.mjs +69 -37
- package/dist/x/differenceWith.es.js +14 -14
- package/dist/x/differenceWith.es.min.js +1 -1
- package/dist/x/differenceWith.js +14 -14
- package/dist/x/differenceWith.min.js +1 -1
- package/dist/x/differenceWith.mjs +14 -14
- package/dist/x/filterOut.es.js +21 -21
- package/dist/x/filterOut.es.min.js +1 -1
- package/dist/x/filterOut.js +21 -21
- package/dist/x/filterOut.min.js +1 -1
- package/dist/x/filterOut.mjs +21 -21
- package/dist/x/find.es.js +18 -18
- package/dist/x/find.es.min.js +1 -1
- package/dist/x/find.js +18 -18
- package/dist/x/find.min.js +1 -1
- package/dist/x/find.mjs +18 -18
- package/dist/x/findIndex.es.js +1 -1
- package/dist/x/findIndex.es.min.js +1 -1
- package/dist/x/findIndex.js +1 -1
- package/dist/x/findIndex.min.js +1 -1
- package/dist/x/findIndex.mjs +1 -1
- package/dist/x/first.es.js +1 -1
- package/dist/x/first.es.min.js +1 -1
- package/dist/x/first.js +1 -1
- package/dist/x/first.min.js +1 -1
- package/dist/x/first.mjs +1 -1
- package/dist/x/flatten.es.js +82 -82
- package/dist/x/flatten.es.min.js +1 -1
- package/dist/x/flatten.js +82 -82
- package/dist/x/flatten.min.js +1 -1
- package/dist/x/flatten.mjs +82 -82
- package/dist/x/groupBy.es.js +17 -17
- package/dist/x/groupBy.es.min.js +1 -1
- package/dist/x/groupBy.js +17 -17
- package/dist/x/groupBy.min.js +1 -1
- package/dist/x/groupBy.mjs +17 -17
- package/dist/x/has.es.js +1 -1
- package/dist/x/has.es.min.js +1 -1
- package/dist/x/has.js +1 -1
- package/dist/x/has.min.js +1 -1
- package/dist/x/has.mjs +1 -1
- package/dist/x/identity.es.js +1 -1
- package/dist/x/identity.es.min.js +1 -1
- package/dist/x/identity.js +1 -1
- package/dist/x/identity.min.js +1 -1
- package/dist/x/identity.mjs +1 -1
- package/dist/x/includes.es.js +1 -1
- package/dist/x/includes.es.min.js +1 -1
- package/dist/x/includes.js +1 -1
- package/dist/x/includes.min.js +1 -1
- package/dist/x/includes.mjs +1 -1
- package/dist/x/isDeepEqual.es.js +1 -1
- package/dist/x/isDeepEqual.es.min.js +1 -1
- package/dist/x/isDeepEqual.js +1 -1
- package/dist/x/isDeepEqual.min.js +1 -1
- package/dist/x/isDeepEqual.mjs +1 -1
- package/dist/x/isEmpty.es.js +1 -1
- package/dist/x/isEmpty.es.min.js +1 -1
- package/dist/x/isEmpty.js +1 -1
- package/dist/x/isEmpty.min.js +1 -1
- package/dist/x/isEmpty.mjs +1 -1
- package/dist/x/isEqual.es.js +1 -1
- package/dist/x/isEqual.es.min.js +1 -1
- package/dist/x/isEqual.js +1 -1
- package/dist/x/isEqual.min.js +1 -1
- package/dist/x/isEqual.mjs +1 -1
- package/dist/x/isFunction.es.js +1 -1
- package/dist/x/isFunction.es.min.js +1 -1
- package/dist/x/isFunction.js +1 -1
- package/dist/x/isFunction.min.js +1 -1
- package/dist/x/isFunction.mjs +1 -1
- package/dist/x/isIn.es.js +1 -1
- package/dist/x/isIn.es.min.js +1 -1
- package/dist/x/isIn.js +1 -1
- package/dist/x/isIn.min.js +1 -1
- package/dist/x/isIn.mjs +1 -1
- package/dist/x/isObject.es.js +1 -1
- package/dist/x/isObject.es.min.js +1 -1
- package/dist/x/isObject.js +1 -1
- package/dist/x/isObject.min.js +1 -1
- package/dist/x/isObject.mjs +1 -1
- package/dist/x/isString.es.js +1 -1
- package/dist/x/isString.es.min.js +1 -1
- package/dist/x/isString.js +1 -1
- package/dist/x/isString.min.js +1 -1
- package/dist/x/isString.mjs +1 -1
- package/dist/x/keys.es.js +1 -1
- package/dist/x/keys.es.min.js +1 -1
- package/dist/x/keys.js +1 -1
- package/dist/x/keys.min.js +1 -1
- package/dist/x/keys.mjs +1 -1
- package/dist/x/last.es.js +1 -1
- package/dist/x/last.es.min.js +1 -1
- package/dist/x/last.js +1 -1
- package/dist/x/last.min.js +1 -1
- package/dist/x/last.mjs +1 -1
- package/dist/x/maxBy.es.js +6 -6
- package/dist/x/maxBy.es.min.js +1 -1
- package/dist/x/maxBy.js +6 -6
- package/dist/x/maxBy.min.js +1 -1
- package/dist/x/maxBy.mjs +6 -6
- package/dist/x/noop.es.js +1 -1
- package/dist/x/noop.es.min.js +1 -1
- package/dist/x/noop.js +1 -1
- package/dist/x/noop.min.js +1 -1
- package/dist/x/noop.mjs +1 -1
- package/dist/x/pluck.es.js +83 -83
- package/dist/x/pluck.es.min.js +1 -1
- package/dist/x/pluck.js +83 -83
- package/dist/x/pluck.min.js +1 -1
- package/dist/x/pluck.mjs +83 -83
- package/dist/x/prepend.es.js +8 -8
- package/dist/x/prepend.es.min.js +1 -1
- package/dist/x/prepend.js +8 -8
- package/dist/x/prepend.min.js +1 -1
- package/dist/x/prepend.mjs +8 -8
- package/dist/x/size.es.js +1 -1
- package/dist/x/size.es.min.js +1 -1
- package/dist/x/size.js +1 -1
- package/dist/x/size.min.js +1 -1
- package/dist/x/size.mjs +1 -1
- package/dist/x/trace.es.js +1 -1
- package/dist/x/trace.es.min.js +1 -1
- package/dist/x/trace.js +1 -1
- package/dist/x/trace.min.js +1 -1
- package/dist/x/trace.mjs +1 -1
- package/dist/x/unionWith.es.js +39 -39
- package/dist/x/unionWith.es.min.js +1 -1
- package/dist/x/unionWith.js +39 -39
- package/dist/x/unionWith.min.js +1 -1
- package/dist/x/unionWith.mjs +39 -39
- package/dist/x/uniq.es.js +1 -1
- package/dist/x/uniq.es.min.js +1 -1
- package/dist/x/uniq.js +1 -1
- package/dist/x/uniq.min.js +1 -1
- package/dist/x/uniq.mjs +1 -1
- package/dist/x/unless.es.js +1 -1
- package/dist/x/unless.es.min.js +1 -1
- package/dist/x/unless.js +1 -1
- package/dist/x/unless.min.js +1 -1
- package/dist/x/unless.mjs +1 -1
- package/dist/x/values.es.js +1 -1
- package/dist/x/values.es.min.js +1 -1
- package/dist/x/values.js +1 -1
- package/dist/x/values.min.js +1 -1
- package/dist/x/values.mjs +1 -1
- package/dist/x/when.es.js +1 -1
- package/dist/x/when.es.min.js +1 -1
- package/dist/x/when.js +1 -1
- package/dist/x/when.min.js +1 -1
- package/dist/x/when.mjs +1 -1
- package/eq.js +32 -10
- package/es.js +215 -215
- package/every.d.ts +1 -1
- package/every.js +6 -3
- package/filter.d.ts +3 -3
- package/filter.js +14 -14
- package/flatMap.d.ts +9 -9
- package/flatMap.js +9 -9
- package/forEach.d.ts +1 -1
- package/forEach.js +19 -15
- package/global.js +1 -0
- package/gt.js +30 -13
- package/gte.js +31 -12
- package/index.js +215 -215
- package/lt.js +28 -9
- package/lte.js +34 -15
- package/map.d.ts +3 -3
- package/map.js +31 -31
- package/monad/Mux.benchmark.js +1 -1
- package/monad/Mux.js +6 -6
- package/monad/Struct.js +2 -2
- package/not.js +15 -7
- package/or.js +5 -2
- package/package.json +1 -1
- package/pipe.js +7 -13
- package/reduce.d.ts +7 -7
- package/reduce.js +16 -16
- package/some.d.ts +1 -1
- package/some.js +6 -3
- package/switchCase.d.ts +1 -1
- package/switchCase.js +7 -4
- package/tap.js +14 -4
- package/thunkify.js +2 -0
- package/transform.d.ts +1 -1
- package/transform.js +6 -15
- package/tryCatch.js +8 -2
- package/x/README.md +8 -8
- package/x/append.d.ts +2 -2
- package/x/append.js +8 -8
- package/x/defaultsDeep.js +94 -57
- package/x/defaultsDeep.test.js +24 -1
- package/x/differenceWith.js +13 -13
- package/x/find.d.ts +1 -1
- package/x/find.js +1 -1
- package/x/find.test.js +2 -2
- package/x/findIndex.test.js +1 -1
- package/x/first.d.ts +1 -1
- package/x/first.js +1 -1
- package/x/first.test.js +1 -1
- package/x/groupBy.d.ts +1 -1
- package/x/groupBy.js +13 -13
- package/x/last.d.ts +1 -1
- package/x/last.js +1 -1
- package/x/last.test.js +1 -1
- package/x/maxBy.d.ts +7 -7
- package/x/maxBy.js +13 -13
- package/x/maxBy.test.js +5 -5
- package/x/pluck.test.js +1 -1
- package/x/prepend.d.ts +2 -2
- package/x/prepend.js +8 -8
- package/x/size.d.ts +1 -1
- package/x/size.js +1 -1
- package/x/unionWith.js +11 -11
- package/x/unionWith.test.js +5 -5
- package/global.d.ts +0 -1
package/curry.js
CHANGED
|
@@ -5,17 +5,14 @@ const curryArity = require('./_internal/curryArity')
|
|
|
5
5
|
*
|
|
6
6
|
* @synopsis
|
|
7
7
|
* ```coffeescript [specscript]
|
|
8
|
-
*
|
|
8
|
+
* __ Symbol(placeholder)
|
|
9
|
+
*
|
|
9
10
|
* type ArgsWithPlaceholder = Array<__|any>
|
|
10
11
|
*
|
|
11
12
|
* args ArgsWithPlaceholder
|
|
12
13
|
* moreArgs ArgsWithPlaceholder
|
|
13
14
|
*
|
|
14
|
-
* curry(
|
|
15
|
-
* func function,
|
|
16
|
-
* ...args
|
|
17
|
-
* ) -> curriedFuncOrResult function|any
|
|
18
|
-
*
|
|
15
|
+
* curry(func function, ...args) -> curriedFuncOrResult function|any
|
|
19
16
|
* curriedFuncOrResult(...moreArgs) -> anotherCurriedFuncOrResult function|any
|
|
20
17
|
* ```
|
|
21
18
|
*
|
|
@@ -55,15 +52,11 @@ const curry = (func, ...args) => curryArity(func.length, func, args)
|
|
|
55
52
|
* type __ = Symbol(placeholder)
|
|
56
53
|
* type ArgsWithPlaceholder = Array<__|any>
|
|
57
54
|
*
|
|
55
|
+
* n number
|
|
58
56
|
* args ArgsWithPlaceholder
|
|
59
57
|
* moreArgs ArgsWithPlaceholder
|
|
60
58
|
*
|
|
61
|
-
* curry.arity(
|
|
62
|
-
* arity number,
|
|
63
|
-
* func function,
|
|
64
|
-
* ...args
|
|
65
|
-
* ) -> curriedFuncOrResult function|any
|
|
66
|
-
*
|
|
59
|
+
* curry.arity(n number, func function, ...args) -> curriedFuncOrResult function|any
|
|
67
60
|
* curriedFuncOrResult(...moreArgs) -> anotherCurriedFuncOrResult function|any
|
|
68
61
|
* ```
|
|
69
62
|
*
|
package/dist/Transducer.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.5
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
4
|
* (c) 2019-2025 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
@@ -40,11 +40,11 @@ const curry2 = function (baseFunc, arg0, arg1) {
|
|
|
40
40
|
|
|
41
41
|
const reducerMap = (
|
|
42
42
|
reducer, mapper,
|
|
43
|
-
) => function mappingReducer(result,
|
|
44
|
-
const
|
|
45
|
-
return isPromise(
|
|
46
|
-
?
|
|
47
|
-
: reducer(result,
|
|
43
|
+
) => function mappingReducer(result, reducerElement) {
|
|
44
|
+
const mappingReducerElement = mapper(reducerElement)
|
|
45
|
+
return isPromise(mappingReducerElement)
|
|
46
|
+
? mappingReducerElement.then(curry2(reducer, result, __))
|
|
47
|
+
: reducer(result, mappingReducerElement)
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// argument resolver for curry3
|
|
@@ -90,15 +90,15 @@ const always = value => function getter() { return value }
|
|
|
90
90
|
|
|
91
91
|
const reducerFilter = (
|
|
92
92
|
reducer, predicate,
|
|
93
|
-
) => function filteringReducer(result,
|
|
94
|
-
const shouldInclude = predicate(
|
|
93
|
+
) => function filteringReducer(result, element) {
|
|
94
|
+
const shouldInclude = predicate(element)
|
|
95
95
|
return isPromise(shouldInclude)
|
|
96
96
|
? shouldInclude.then(curry3(
|
|
97
97
|
thunkConditional,
|
|
98
98
|
__,
|
|
99
|
-
thunkify2(reducer, result,
|
|
99
|
+
thunkify2(reducer, result, element),
|
|
100
100
|
always(result)))
|
|
101
|
-
: shouldInclude ? reducer(result,
|
|
101
|
+
: shouldInclude ? reducer(result, element) : result
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
const isArray = Array.isArray
|
|
@@ -392,11 +392,11 @@ const mapReduce = function (map, reducer, result) {
|
|
|
392
392
|
|
|
393
393
|
const reducerConcat = (
|
|
394
394
|
reducerA, reducerB,
|
|
395
|
-
) => function pipedReducer(result,
|
|
396
|
-
const intermediate = reducerA(result,
|
|
395
|
+
) => function pipedReducer(result, element) {
|
|
396
|
+
const intermediate = reducerA(result, element)
|
|
397
397
|
return isPromise(intermediate)
|
|
398
|
-
? intermediate.then(curry2(reducerB, __,
|
|
399
|
-
: reducerB(intermediate,
|
|
398
|
+
? intermediate.then(curry2(reducerB, __, element))
|
|
399
|
+
: reducerB(intermediate, element)
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
const genericReduce = function (collection, reducer, result) {
|
|
@@ -448,32 +448,32 @@ const reducerFlatMap = (
|
|
|
448
448
|
|
|
449
449
|
const reducerForEach = (
|
|
450
450
|
reducer, callback,
|
|
451
|
-
) => function executingForEach(result,
|
|
452
|
-
const operation = callback(
|
|
451
|
+
) => function executingForEach(result, element) {
|
|
452
|
+
const operation = callback(element)
|
|
453
453
|
if (isPromise(operation)) {
|
|
454
|
-
return operation.then(thunkify2(reducer, result,
|
|
454
|
+
return operation.then(thunkify2(reducer, result, element))
|
|
455
455
|
}
|
|
456
|
-
return reducer(result,
|
|
456
|
+
return reducer(result, element)
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
const _reducerTryCatchErrorHandler = function (
|
|
460
|
-
catcher, reducer, error, accum,
|
|
460
|
+
catcher, reducer, error, accum, element,
|
|
461
461
|
) {
|
|
462
|
-
const c = catcher(error,
|
|
462
|
+
const c = catcher(error, element)
|
|
463
463
|
return isPromise(c) ? c.then(curry2(reducer, accum, __)) : reducer(accum, c)
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
const reducerTryCatch = function (reducer, transducerTryer, catcher) {
|
|
467
467
|
const finalReducer = transducerTryer(reducer)
|
|
468
|
-
return function errorHandlingReducer(accum,
|
|
468
|
+
return function errorHandlingReducer(accum, element) {
|
|
469
469
|
try {
|
|
470
|
-
const ret = finalReducer(accum,
|
|
470
|
+
const ret = finalReducer(accum, element)
|
|
471
471
|
return isPromise(ret) ? ret.catch(curry5(
|
|
472
|
-
_reducerTryCatchErrorHandler, catcher, reducer, __, accum,
|
|
472
|
+
_reducerTryCatchErrorHandler, catcher, reducer, __, accum, element,
|
|
473
473
|
)) : ret
|
|
474
474
|
} catch (error) {
|
|
475
475
|
return _reducerTryCatchErrorHandler(
|
|
476
|
-
catcher, reducer, error, accum,
|
|
476
|
+
catcher, reducer, error, accum, element,
|
|
477
477
|
)
|
|
478
478
|
}
|
|
479
479
|
}
|
package/dist/Transducer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.5
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
4
|
* (c) 2019-2025 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
@@ -46,11 +46,11 @@ const curry2 = function (baseFunc, arg0, arg1) {
|
|
|
46
46
|
|
|
47
47
|
const reducerMap = (
|
|
48
48
|
reducer, mapper,
|
|
49
|
-
) => function mappingReducer(result,
|
|
50
|
-
const
|
|
51
|
-
return isPromise(
|
|
52
|
-
?
|
|
53
|
-
: reducer(result,
|
|
49
|
+
) => function mappingReducer(result, reducerElement) {
|
|
50
|
+
const mappingReducerElement = mapper(reducerElement)
|
|
51
|
+
return isPromise(mappingReducerElement)
|
|
52
|
+
? mappingReducerElement.then(curry2(reducer, result, __))
|
|
53
|
+
: reducer(result, mappingReducerElement)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// argument resolver for curry3
|
|
@@ -96,15 +96,15 @@ const always = value => function getter() { return value }
|
|
|
96
96
|
|
|
97
97
|
const reducerFilter = (
|
|
98
98
|
reducer, predicate,
|
|
99
|
-
) => function filteringReducer(result,
|
|
100
|
-
const shouldInclude = predicate(
|
|
99
|
+
) => function filteringReducer(result, element) {
|
|
100
|
+
const shouldInclude = predicate(element)
|
|
101
101
|
return isPromise(shouldInclude)
|
|
102
102
|
? shouldInclude.then(curry3(
|
|
103
103
|
thunkConditional,
|
|
104
104
|
__,
|
|
105
|
-
thunkify2(reducer, result,
|
|
105
|
+
thunkify2(reducer, result, element),
|
|
106
106
|
always(result)))
|
|
107
|
-
: shouldInclude ? reducer(result,
|
|
107
|
+
: shouldInclude ? reducer(result, element) : result
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
const isArray = Array.isArray
|
|
@@ -398,11 +398,11 @@ const mapReduce = function (map, reducer, result) {
|
|
|
398
398
|
|
|
399
399
|
const reducerConcat = (
|
|
400
400
|
reducerA, reducerB,
|
|
401
|
-
) => function pipedReducer(result,
|
|
402
|
-
const intermediate = reducerA(result,
|
|
401
|
+
) => function pipedReducer(result, element) {
|
|
402
|
+
const intermediate = reducerA(result, element)
|
|
403
403
|
return isPromise(intermediate)
|
|
404
|
-
? intermediate.then(curry2(reducerB, __,
|
|
405
|
-
: reducerB(intermediate,
|
|
404
|
+
? intermediate.then(curry2(reducerB, __, element))
|
|
405
|
+
: reducerB(intermediate, element)
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
const genericReduce = function (collection, reducer, result) {
|
|
@@ -454,32 +454,32 @@ const reducerFlatMap = (
|
|
|
454
454
|
|
|
455
455
|
const reducerForEach = (
|
|
456
456
|
reducer, callback,
|
|
457
|
-
) => function executingForEach(result,
|
|
458
|
-
const operation = callback(
|
|
457
|
+
) => function executingForEach(result, element) {
|
|
458
|
+
const operation = callback(element)
|
|
459
459
|
if (isPromise(operation)) {
|
|
460
|
-
return operation.then(thunkify2(reducer, result,
|
|
460
|
+
return operation.then(thunkify2(reducer, result, element))
|
|
461
461
|
}
|
|
462
|
-
return reducer(result,
|
|
462
|
+
return reducer(result, element)
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
const _reducerTryCatchErrorHandler = function (
|
|
466
|
-
catcher, reducer, error, accum,
|
|
466
|
+
catcher, reducer, error, accum, element,
|
|
467
467
|
) {
|
|
468
|
-
const c = catcher(error,
|
|
468
|
+
const c = catcher(error, element)
|
|
469
469
|
return isPromise(c) ? c.then(curry2(reducer, accum, __)) : reducer(accum, c)
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
const reducerTryCatch = function (reducer, transducerTryer, catcher) {
|
|
473
473
|
const finalReducer = transducerTryer(reducer)
|
|
474
|
-
return function errorHandlingReducer(accum,
|
|
474
|
+
return function errorHandlingReducer(accum, element) {
|
|
475
475
|
try {
|
|
476
|
-
const ret = finalReducer(accum,
|
|
476
|
+
const ret = finalReducer(accum, element)
|
|
477
477
|
return isPromise(ret) ? ret.catch(curry5(
|
|
478
|
-
_reducerTryCatchErrorHandler, catcher, reducer, __, accum,
|
|
478
|
+
_reducerTryCatchErrorHandler, catcher, reducer, __, accum, element,
|
|
479
479
|
)) : ret
|
|
480
480
|
} catch (error) {
|
|
481
481
|
return _reducerTryCatchErrorHandler(
|
|
482
|
-
catcher, reducer, error, accum,
|
|
482
|
+
catcher, reducer, error, accum, element,
|
|
483
483
|
)
|
|
484
484
|
}
|
|
485
485
|
}
|
package/dist/Transducer.min.js
CHANGED
package/dist/Transducer.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.5
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
4
|
* (c) 2019-2025 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
@@ -40,11 +40,11 @@ const curry2 = function (baseFunc, arg0, arg1) {
|
|
|
40
40
|
|
|
41
41
|
const reducerMap = (
|
|
42
42
|
reducer, mapper,
|
|
43
|
-
) => function mappingReducer(result,
|
|
44
|
-
const
|
|
45
|
-
return isPromise(
|
|
46
|
-
?
|
|
47
|
-
: reducer(result,
|
|
43
|
+
) => function mappingReducer(result, reducerElement) {
|
|
44
|
+
const mappingReducerElement = mapper(reducerElement)
|
|
45
|
+
return isPromise(mappingReducerElement)
|
|
46
|
+
? mappingReducerElement.then(curry2(reducer, result, __))
|
|
47
|
+
: reducer(result, mappingReducerElement)
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// argument resolver for curry3
|
|
@@ -90,15 +90,15 @@ const always = value => function getter() { return value }
|
|
|
90
90
|
|
|
91
91
|
const reducerFilter = (
|
|
92
92
|
reducer, predicate,
|
|
93
|
-
) => function filteringReducer(result,
|
|
94
|
-
const shouldInclude = predicate(
|
|
93
|
+
) => function filteringReducer(result, element) {
|
|
94
|
+
const shouldInclude = predicate(element)
|
|
95
95
|
return isPromise(shouldInclude)
|
|
96
96
|
? shouldInclude.then(curry3(
|
|
97
97
|
thunkConditional,
|
|
98
98
|
__,
|
|
99
|
-
thunkify2(reducer, result,
|
|
99
|
+
thunkify2(reducer, result, element),
|
|
100
100
|
always(result)))
|
|
101
|
-
: shouldInclude ? reducer(result,
|
|
101
|
+
: shouldInclude ? reducer(result, element) : result
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
const isArray = Array.isArray
|
|
@@ -392,11 +392,11 @@ const mapReduce = function (map, reducer, result) {
|
|
|
392
392
|
|
|
393
393
|
const reducerConcat = (
|
|
394
394
|
reducerA, reducerB,
|
|
395
|
-
) => function pipedReducer(result,
|
|
396
|
-
const intermediate = reducerA(result,
|
|
395
|
+
) => function pipedReducer(result, element) {
|
|
396
|
+
const intermediate = reducerA(result, element)
|
|
397
397
|
return isPromise(intermediate)
|
|
398
|
-
? intermediate.then(curry2(reducerB, __,
|
|
399
|
-
: reducerB(intermediate,
|
|
398
|
+
? intermediate.then(curry2(reducerB, __, element))
|
|
399
|
+
: reducerB(intermediate, element)
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
const genericReduce = function (collection, reducer, result) {
|
|
@@ -448,32 +448,32 @@ const reducerFlatMap = (
|
|
|
448
448
|
|
|
449
449
|
const reducerForEach = (
|
|
450
450
|
reducer, callback,
|
|
451
|
-
) => function executingForEach(result,
|
|
452
|
-
const operation = callback(
|
|
451
|
+
) => function executingForEach(result, element) {
|
|
452
|
+
const operation = callback(element)
|
|
453
453
|
if (isPromise(operation)) {
|
|
454
|
-
return operation.then(thunkify2(reducer, result,
|
|
454
|
+
return operation.then(thunkify2(reducer, result, element))
|
|
455
455
|
}
|
|
456
|
-
return reducer(result,
|
|
456
|
+
return reducer(result, element)
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
const _reducerTryCatchErrorHandler = function (
|
|
460
|
-
catcher, reducer, error, accum,
|
|
460
|
+
catcher, reducer, error, accum, element,
|
|
461
461
|
) {
|
|
462
|
-
const c = catcher(error,
|
|
462
|
+
const c = catcher(error, element)
|
|
463
463
|
return isPromise(c) ? c.then(curry2(reducer, accum, __)) : reducer(accum, c)
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
const reducerTryCatch = function (reducer, transducerTryer, catcher) {
|
|
467
467
|
const finalReducer = transducerTryer(reducer)
|
|
468
|
-
return function errorHandlingReducer(accum,
|
|
468
|
+
return function errorHandlingReducer(accum, element) {
|
|
469
469
|
try {
|
|
470
|
-
const ret = finalReducer(accum,
|
|
470
|
+
const ret = finalReducer(accum, element)
|
|
471
471
|
return isPromise(ret) ? ret.catch(curry5(
|
|
472
|
-
_reducerTryCatchErrorHandler, catcher, reducer, __, accum,
|
|
472
|
+
_reducerTryCatchErrorHandler, catcher, reducer, __, accum, element,
|
|
473
473
|
)) : ret
|
|
474
474
|
} catch (error) {
|
|
475
475
|
return _reducerTryCatchErrorHandler(
|
|
476
|
-
catcher, reducer, error, accum,
|
|
476
|
+
catcher, reducer, error, accum, element,
|
|
477
477
|
)
|
|
478
478
|
}
|
|
479
479
|
}
|
package/dist/__.es.js
CHANGED
package/dist/__.es.min.js
CHANGED
package/dist/__.js
CHANGED
package/dist/__.min.js
CHANGED
package/dist/__.mjs
CHANGED
package/dist/all.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.5
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
4
|
* (c) 2019-2025 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
@@ -127,11 +127,11 @@ const functionArrayAll = function (funcs, args) {
|
|
|
127
127
|
let funcsIndex = -1, isAsync = false
|
|
128
128
|
while (++funcsIndex < funcsLength) {
|
|
129
129
|
const f = funcs[funcsIndex]
|
|
130
|
-
const
|
|
131
|
-
if (isPromise(
|
|
130
|
+
const resultElement = typeof f == 'function' ? f(...args) : f
|
|
131
|
+
if (isPromise(resultElement)) {
|
|
132
132
|
isAsync = true
|
|
133
133
|
}
|
|
134
|
-
result[funcsIndex] =
|
|
134
|
+
result[funcsIndex] = resultElement
|
|
135
135
|
}
|
|
136
136
|
return isAsync ? promiseAll(result) : result
|
|
137
137
|
}
|
|
@@ -225,8 +225,8 @@ const objectSet = function (object, property, value) {
|
|
|
225
225
|
const asyncFunctionArrayAllSeries = async function (funcs, args, result, funcsIndex) {
|
|
226
226
|
const funcsLength = funcs.length
|
|
227
227
|
while (++funcsIndex < funcsLength) {
|
|
228
|
-
const
|
|
229
|
-
result[funcsIndex] = isPromise(
|
|
228
|
+
const resultElement = funcs[funcsIndex](...args)
|
|
229
|
+
result[funcsIndex] = isPromise(resultElement) ? await resultElement : resultElement
|
|
230
230
|
}
|
|
231
231
|
return result
|
|
232
232
|
}
|
|
@@ -235,13 +235,13 @@ const functionArrayAllSeries = function (funcs, args) {
|
|
|
235
235
|
const funcsLength = funcs.length, result = []
|
|
236
236
|
let funcsIndex = -1
|
|
237
237
|
while (++funcsIndex < funcsLength) {
|
|
238
|
-
const
|
|
239
|
-
if (isPromise(
|
|
240
|
-
return
|
|
238
|
+
const resultElement = funcs[funcsIndex](...args)
|
|
239
|
+
if (isPromise(resultElement)) {
|
|
240
|
+
return resultElement.then(funcConcat(
|
|
241
241
|
curry3(objectSet, result, funcsIndex, __),
|
|
242
242
|
curry4(asyncFunctionArrayAllSeries, funcs, args, __, funcsIndex)))
|
|
243
243
|
}
|
|
244
|
-
result[funcsIndex] =
|
|
244
|
+
result[funcsIndex] = resultElement
|
|
245
245
|
}
|
|
246
246
|
return result
|
|
247
247
|
}
|
|
@@ -252,11 +252,11 @@ const functionObjectAll = function (funcs, args) {
|
|
|
252
252
|
const result = {}, promises = []
|
|
253
253
|
for (const key in funcs) {
|
|
254
254
|
const f = funcs[key]
|
|
255
|
-
const
|
|
256
|
-
if (isPromise(
|
|
257
|
-
promises.push(
|
|
255
|
+
const resultElement = typeof f == 'function' ? f(...args) : f
|
|
256
|
+
if (isPromise(resultElement)) {
|
|
257
|
+
promises.push(resultElement.then(curry3(objectSet, result, key, __)))
|
|
258
258
|
} else {
|
|
259
|
-
result[key] =
|
|
259
|
+
result[key] = resultElement
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
return promises.length == 0 ? result : promiseAll(promises).then(always(result))
|
package/dist/all.es.min.js
CHANGED
package/dist/all.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.5
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
4
|
* (c) 2019-2025 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
@@ -133,11 +133,11 @@ const functionArrayAll = function (funcs, args) {
|
|
|
133
133
|
let funcsIndex = -1, isAsync = false
|
|
134
134
|
while (++funcsIndex < funcsLength) {
|
|
135
135
|
const f = funcs[funcsIndex]
|
|
136
|
-
const
|
|
137
|
-
if (isPromise(
|
|
136
|
+
const resultElement = typeof f == 'function' ? f(...args) : f
|
|
137
|
+
if (isPromise(resultElement)) {
|
|
138
138
|
isAsync = true
|
|
139
139
|
}
|
|
140
|
-
result[funcsIndex] =
|
|
140
|
+
result[funcsIndex] = resultElement
|
|
141
141
|
}
|
|
142
142
|
return isAsync ? promiseAll(result) : result
|
|
143
143
|
}
|
|
@@ -231,8 +231,8 @@ const objectSet = function (object, property, value) {
|
|
|
231
231
|
const asyncFunctionArrayAllSeries = async function (funcs, args, result, funcsIndex) {
|
|
232
232
|
const funcsLength = funcs.length
|
|
233
233
|
while (++funcsIndex < funcsLength) {
|
|
234
|
-
const
|
|
235
|
-
result[funcsIndex] = isPromise(
|
|
234
|
+
const resultElement = funcs[funcsIndex](...args)
|
|
235
|
+
result[funcsIndex] = isPromise(resultElement) ? await resultElement : resultElement
|
|
236
236
|
}
|
|
237
237
|
return result
|
|
238
238
|
}
|
|
@@ -241,13 +241,13 @@ const functionArrayAllSeries = function (funcs, args) {
|
|
|
241
241
|
const funcsLength = funcs.length, result = []
|
|
242
242
|
let funcsIndex = -1
|
|
243
243
|
while (++funcsIndex < funcsLength) {
|
|
244
|
-
const
|
|
245
|
-
if (isPromise(
|
|
246
|
-
return
|
|
244
|
+
const resultElement = funcs[funcsIndex](...args)
|
|
245
|
+
if (isPromise(resultElement)) {
|
|
246
|
+
return resultElement.then(funcConcat(
|
|
247
247
|
curry3(objectSet, result, funcsIndex, __),
|
|
248
248
|
curry4(asyncFunctionArrayAllSeries, funcs, args, __, funcsIndex)))
|
|
249
249
|
}
|
|
250
|
-
result[funcsIndex] =
|
|
250
|
+
result[funcsIndex] = resultElement
|
|
251
251
|
}
|
|
252
252
|
return result
|
|
253
253
|
}
|
|
@@ -258,11 +258,11 @@ const functionObjectAll = function (funcs, args) {
|
|
|
258
258
|
const result = {}, promises = []
|
|
259
259
|
for (const key in funcs) {
|
|
260
260
|
const f = funcs[key]
|
|
261
|
-
const
|
|
262
|
-
if (isPromise(
|
|
263
|
-
promises.push(
|
|
261
|
+
const resultElement = typeof f == 'function' ? f(...args) : f
|
|
262
|
+
if (isPromise(resultElement)) {
|
|
263
|
+
promises.push(resultElement.then(curry3(objectSet, result, key, __)))
|
|
264
264
|
} else {
|
|
265
|
-
result[key] =
|
|
265
|
+
result[key] = resultElement
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
return promises.length == 0 ? result : promiseAll(promises).then(always(result))
|
package/dist/all.min.js
CHANGED
package/dist/all.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rubico v2.7.
|
|
2
|
+
* rubico v2.7.5
|
|
3
3
|
* https://github.com/a-synchronous/rubico
|
|
4
4
|
* (c) 2019-2025 Richard Tong
|
|
5
5
|
* rubico may be freely distributed under the MIT license.
|
|
@@ -127,11 +127,11 @@ const functionArrayAll = function (funcs, args) {
|
|
|
127
127
|
let funcsIndex = -1, isAsync = false
|
|
128
128
|
while (++funcsIndex < funcsLength) {
|
|
129
129
|
const f = funcs[funcsIndex]
|
|
130
|
-
const
|
|
131
|
-
if (isPromise(
|
|
130
|
+
const resultElement = typeof f == 'function' ? f(...args) : f
|
|
131
|
+
if (isPromise(resultElement)) {
|
|
132
132
|
isAsync = true
|
|
133
133
|
}
|
|
134
|
-
result[funcsIndex] =
|
|
134
|
+
result[funcsIndex] = resultElement
|
|
135
135
|
}
|
|
136
136
|
return isAsync ? promiseAll(result) : result
|
|
137
137
|
}
|
|
@@ -225,8 +225,8 @@ const objectSet = function (object, property, value) {
|
|
|
225
225
|
const asyncFunctionArrayAllSeries = async function (funcs, args, result, funcsIndex) {
|
|
226
226
|
const funcsLength = funcs.length
|
|
227
227
|
while (++funcsIndex < funcsLength) {
|
|
228
|
-
const
|
|
229
|
-
result[funcsIndex] = isPromise(
|
|
228
|
+
const resultElement = funcs[funcsIndex](...args)
|
|
229
|
+
result[funcsIndex] = isPromise(resultElement) ? await resultElement : resultElement
|
|
230
230
|
}
|
|
231
231
|
return result
|
|
232
232
|
}
|
|
@@ -235,13 +235,13 @@ const functionArrayAllSeries = function (funcs, args) {
|
|
|
235
235
|
const funcsLength = funcs.length, result = []
|
|
236
236
|
let funcsIndex = -1
|
|
237
237
|
while (++funcsIndex < funcsLength) {
|
|
238
|
-
const
|
|
239
|
-
if (isPromise(
|
|
240
|
-
return
|
|
238
|
+
const resultElement = funcs[funcsIndex](...args)
|
|
239
|
+
if (isPromise(resultElement)) {
|
|
240
|
+
return resultElement.then(funcConcat(
|
|
241
241
|
curry3(objectSet, result, funcsIndex, __),
|
|
242
242
|
curry4(asyncFunctionArrayAllSeries, funcs, args, __, funcsIndex)))
|
|
243
243
|
}
|
|
244
|
-
result[funcsIndex] =
|
|
244
|
+
result[funcsIndex] = resultElement
|
|
245
245
|
}
|
|
246
246
|
return result
|
|
247
247
|
}
|
|
@@ -252,11 +252,11 @@ const functionObjectAll = function (funcs, args) {
|
|
|
252
252
|
const result = {}, promises = []
|
|
253
253
|
for (const key in funcs) {
|
|
254
254
|
const f = funcs[key]
|
|
255
|
-
const
|
|
256
|
-
if (isPromise(
|
|
257
|
-
promises.push(
|
|
255
|
+
const resultElement = typeof f == 'function' ? f(...args) : f
|
|
256
|
+
if (isPromise(resultElement)) {
|
|
257
|
+
promises.push(resultElement.then(curry3(objectSet, result, key, __)))
|
|
258
258
|
} else {
|
|
259
|
-
result[key] =
|
|
259
|
+
result[key] = resultElement
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
return promises.length == 0 ? result : promiseAll(promises).then(always(result))
|
package/dist/always.es.js
CHANGED
package/dist/always.es.min.js
CHANGED
package/dist/always.js
CHANGED
package/dist/always.min.js
CHANGED
package/dist/always.mjs
CHANGED
package/dist/and.es.js
CHANGED