rubico 2.1.0 → 2.2.1
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 +2 -0
- package/_internal/genericTransform.js +30 -28
- package/dist/Transducer.es.js +1 -1
- package/dist/Transducer.es.min.js +1 -1
- package/dist/Transducer.js +1 -1
- package/dist/Transducer.min.js +1 -1
- package/dist/Transducer.mjs +1 -1
- 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 +1 -1
- package/dist/all.es.min.js +1 -1
- package/dist/all.js +1 -1
- package/dist/all.min.js +1 -1
- package/dist/all.mjs +1 -1
- 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 +1 -1
- package/dist/assign.es.min.js +1 -1
- package/dist/assign.js +1 -1
- package/dist/assign.min.js +1 -1
- package/dist/assign.mjs +1 -1
- 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 +1 -1
- package/dist/every.es.min.js +1 -1
- package/dist/every.js +1 -1
- package/dist/every.min.js +1 -1
- package/dist/every.mjs +1 -1
- package/dist/filter.es.js +1 -1
- package/dist/filter.es.min.js +1 -1
- package/dist/filter.js +1 -1
- package/dist/filter.min.js +1 -1
- package/dist/filter.mjs +1 -1
- package/dist/flatMap.es.js +1 -1
- package/dist/flatMap.es.min.js +1 -1
- package/dist/flatMap.js +1 -1
- package/dist/flatMap.min.js +1 -1
- package/dist/flatMap.mjs +1 -1
- package/dist/forEach.es.js +1 -1
- package/dist/forEach.es.min.js +1 -1
- package/dist/forEach.js +1 -1
- package/dist/forEach.min.js +1 -1
- package/dist/forEach.mjs +1 -1
- 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 +1 -1
- package/dist/map.es.min.js +1 -1
- package/dist/map.js +1 -1
- package/dist/map.min.js +1 -1
- package/dist/map.mjs +1 -1
- 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 +1 -1
- package/dist/omit.es.min.js +1 -1
- package/dist/omit.js +1 -1
- package/dist/omit.min.js +1 -1
- package/dist/omit.mjs +1 -1
- 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 +1 -1
- package/dist/reduce.es.min.js +1 -1
- package/dist/reduce.js +1 -1
- package/dist/reduce.min.js +1 -1
- package/dist/reduce.mjs +1 -1
- package/dist/rubico.es.js +57 -46
- package/dist/rubico.es.min.js +2 -2
- package/dist/rubico.global.js +57 -46
- package/dist/rubico.global.min.js +2 -2
- package/dist/rubico.js +57 -46
- package/dist/rubico.min.js +2 -2
- package/dist/rubico.mjs +57 -46
- 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 +1 -1
- package/dist/some.es.min.js +1 -1
- package/dist/some.js +1 -1
- package/dist/some.min.js +1 -1
- package/dist/some.mjs +1 -1
- 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 +32 -2
- package/dist/tap.es.min.js +2 -2
- package/dist/tap.js +32 -2
- package/dist/tap.min.js +2 -2
- package/dist/tap.mjs +32 -2
- 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 +26 -24
- package/dist/transform.es.min.js +2 -2
- package/dist/transform.js +26 -24
- package/dist/transform.min.js +2 -2
- package/dist/transform.mjs +26 -24
- 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 +1 -1
- package/dist/x/append.es.min.js +1 -1
- package/dist/x/append.js +1 -1
- package/dist/x/append.min.js +1 -1
- package/dist/x/append.mjs +1 -1
- 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 +1 -1
- package/dist/x/defaultsDeep.es.min.js +1 -1
- package/dist/x/defaultsDeep.js +1 -1
- package/dist/x/defaultsDeep.min.js +1 -1
- package/dist/x/defaultsDeep.mjs +1 -1
- package/dist/x/differenceWith.es.js +1 -1
- package/dist/x/differenceWith.es.min.js +1 -1
- package/dist/x/differenceWith.js +1 -1
- package/dist/x/differenceWith.min.js +1 -1
- package/dist/x/differenceWith.mjs +1 -1
- package/dist/x/filterOut.es.js +1 -1
- package/dist/x/filterOut.es.min.js +1 -1
- package/dist/x/filterOut.js +1 -1
- package/dist/x/filterOut.min.js +1 -1
- package/dist/x/filterOut.mjs +1 -1
- package/dist/x/find.es.js +1 -1
- package/dist/x/find.es.min.js +1 -1
- package/dist/x/find.js +1 -1
- package/dist/x/find.min.js +1 -1
- package/dist/x/find.mjs +1 -1
- 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 +1 -1
- package/dist/x/flatten.es.min.js +1 -1
- package/dist/x/flatten.js +1 -1
- package/dist/x/flatten.min.js +1 -1
- package/dist/x/flatten.mjs +1 -1
- package/dist/x/groupBy.es.js +1 -1
- package/dist/x/groupBy.es.min.js +1 -1
- package/dist/x/groupBy.js +1 -1
- package/dist/x/groupBy.min.js +1 -1
- package/dist/x/groupBy.mjs +1 -1
- 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 +1 -1
- package/dist/x/maxBy.es.min.js +1 -1
- package/dist/x/maxBy.js +1 -1
- package/dist/x/maxBy.min.js +1 -1
- package/dist/x/maxBy.mjs +1 -1
- 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 +1 -1
- package/dist/x/pluck.es.min.js +1 -1
- package/dist/x/pluck.js +1 -1
- package/dist/x/pluck.min.js +1 -1
- package/dist/x/pluck.mjs +1 -1
- package/dist/x/prepend.es.js +1 -1
- package/dist/x/prepend.es.min.js +1 -1
- package/dist/x/prepend.js +1 -1
- package/dist/x/prepend.min.js +1 -1
- package/dist/x/prepend.mjs +1 -1
- 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 +32 -2
- package/dist/x/trace.es.min.js +2 -2
- package/dist/x/trace.js +32 -2
- package/dist/x/trace.min.js +2 -2
- package/dist/x/trace.mjs +32 -2
- package/dist/x/unionWith.es.js +1 -1
- package/dist/x/unionWith.es.min.js +1 -1
- package/dist/x/unionWith.js +1 -1
- package/dist/x/unionWith.min.js +1 -1
- package/dist/x/unionWith.mjs +1 -1
- 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/es.js +57 -46
- package/index.js +57 -46
- package/package.json +44 -2
- package/tap.js +15 -4
- package/.eslintignore +0 -5
- package/.eslintrc.js +0 -330
- package/.github/workflows/nodejs.yml +0 -27
- package/.vscode/launch.json +0 -25
- package/AggregateReducer.test.js +0 -82
- package/CHANGELOG.md +0 -310
- package/CNAME +0 -1
- package/CODE_OF_CONDUCT.md +0 -128
- package/CONTRIBUTING.md +0 -4
- package/Transducer.test.js +0 -154
- package/_config.yml +0 -1
- package/_internal/improvedGenericTransform.js +0 -93
- package/archive/FlatMappingIterator-2020-09-28.js +0 -68
- package/archive/_Promise-2023-05-29.js +0 -93
- package/archive/arrayMap2-2023-05-29.js +0 -73
- package/archive/benchmarks-v1.9.7/all.js +0 -34
- package/archive/benchmarks-v1.9.7/and.js +0 -24
- package/archive/benchmarks-v1.9.7/any.js +0 -32
- package/archive/benchmarks-v1.9.7/assign.js +0 -174
- package/archive/benchmarks-v1.9.7/curry.js +0 -55
- package/archive/benchmarks-v1.9.7/eq.js +0 -25
- package/archive/benchmarks-v1.9.7/filter.js +0 -1322
- package/archive/benchmarks-v1.9.7/flatMap.js +0 -48
- package/archive/benchmarks-v1.9.7/forEach.js +0 -33
- package/archive/benchmarks-v1.9.7/fork.js +0 -123
- package/archive/benchmarks-v1.9.7/get.js +0 -44
- package/archive/benchmarks-v1.9.7/gt.js +0 -25
- package/archive/benchmarks-v1.9.7/gte.js +0 -25
- package/archive/benchmarks-v1.9.7/integration.js +0 -88
- package/archive/benchmarks-v1.9.7/lt.js +0 -25
- package/archive/benchmarks-v1.9.7/lte.js +0 -25
- package/archive/benchmarks-v1.9.7/map.js +0 -892
- package/archive/benchmarks-v1.9.7/misc.js +0 -470
- package/archive/benchmarks-v1.9.7/omit.js +0 -28
- package/archive/benchmarks-v1.9.7/or.js +0 -51
- package/archive/benchmarks-v1.9.7/pick.js +0 -24
- package/archive/benchmarks-v1.9.7/pipe.js +0 -152
- package/archive/benchmarks-v1.9.7/reduce.js +0 -739
- package/archive/benchmarks-v1.9.7/switchCase.js +0 -256
- package/archive/benchmarks-v1.9.7/tap.js +0 -90
- package/archive/benchmarks-v1.9.7/transform.js +0 -218
- package/archive/benchmarks-v1.9.7/tryCatch.js +0 -108
- package/archive/curry.js +0 -13
- package/archive/examples-v1.6.11/browserModule.html +0 -31
- package/archive/examples-v1.6.11/browserScript.html +0 -32
- package/archive/examples-v1.6.11/coolTransformToConsole.js +0 -1
- package/archive/examples-v1.6.11/denoLargeGasMap.js +0 -85
- package/archive/examples-v1.6.11/denoServer.js +0 -9
- package/archive/examples-v1.6.11/denoServerWithMiddleware.js +0 -55
- package/archive/examples-v1.6.11/logTodosRange.js +0 -21
- package/archive/examples-v1.6.11/makeARequest.html +0 -46
- package/archive/examples-v1.6.11/nodeComplexTransformation.js +0 -106
- package/archive/examples-v1.6.11/nodeConditionallyExtractIDs.js +0 -50
- package/archive/examples-v1.6.11/nodeFloatingPoint.js +0 -55
- package/archive/examples-v1.6.11/nodeGetAllJiraBoards.js +0 -45
- package/archive/examples-v1.6.11/nodeGetSocketIOClientsTotalCount.js +0 -34
- package/archive/examples-v1.6.11/nodeKafkaConsumer.js +0 -63
- package/archive/examples-v1.6.11/nodeMakeMultipleRequests.js +0 -55
- package/archive/examples-v1.6.11/nodeOnRecordAddTask.js +0 -34
- package/archive/examples-v1.6.11/nodePostRequestWithAuth.js +0 -36
- package/archive/examples-v1.6.11/nodeSpeedbackMatchmakingAlgorithm.js +0 -96
- package/archive/examples-v1.6.11/nodeTireData.js +0 -36
- package/archive/examples-v1.6.11/nodeTripleMap.js +0 -85
- package/archive/examples-v1.6.11/squaredOdds.ts +0 -16
- package/archive/examples-v1.6.11/transducerMaxBuyer.js +0 -67
- package/archive/examples-v1.6.11/transformLogTodosRange.js +0 -31
- package/archive/examples-v1.6.11/transformStreamRandomInts.js +0 -19
- package/archive/genericReduceConcurrent.js +0 -277
- package/archive/index.v0.2.9.js +0 -1685
- package/archive/objectValuesGenerator.js +0 -13
- package/archive/test.v0.2.9.js +0 -2334
- package/bench +0 -65
- package/benchmark-output/v1.9.7 +0 -268
- package/benchmarks/all.async.js +0 -43
- package/benchmarks/all.js +0 -43
- package/benchmarks/always.js +0 -15
- package/benchmarks/and.async.js +0 -25
- package/benchmarks/and.js +0 -25
- package/benchmarks/assign.async.js +0 -27
- package/benchmarks/assign.js +0 -27
- package/benchmarks/curry.js +0 -35
- package/benchmarks/eq.async.js +0 -23
- package/benchmarks/eq.js +0 -23
- package/benchmarks/every.async.js +0 -19
- package/benchmarks/every.js +0 -19
- package/benchmarks/filter.async.js +0 -32
- package/benchmarks/filter.js +0 -38
- package/benchmarks/flatMap.async.js +0 -26
- package/benchmarks/flatMap.js +0 -38
- package/benchmarks/get.async.js +0 -19
- package/benchmarks/get.js +0 -39
- package/benchmarks/gt.async.js +0 -23
- package/benchmarks/gt.js +0 -23
- package/benchmarks/gte.async.js +0 -23
- package/benchmarks/gte.js +0 -23
- package/benchmarks/lt.async.js +0 -23
- package/benchmarks/lt.js +0 -23
- package/benchmarks/lte.async.js +0 -23
- package/benchmarks/lte.js +0 -23
- package/benchmarks/map.async.js +0 -43
- package/benchmarks/map.js +0 -40
- package/benchmarks/misc/Promise.js +0 -26
- package/benchmarks/misc/isPromise.js +0 -30
- package/benchmarks/misc/promiseAll.js +0 -36
- package/benchmarks/not.js +0 -23
- package/benchmarks/omit.js +0 -38
- package/benchmarks/or.async.js +0 -25
- package/benchmarks/or.js +0 -25
- package/benchmarks/pick.js +0 -38
- package/benchmarks/pipe.async.js +0 -47
- package/benchmarks/pipe.js +0 -47
- package/benchmarks/reduce.async.js +0 -32
- package/benchmarks/reduce.js +0 -38
- package/benchmarks/set.async.js +0 -19
- package/benchmarks/set.js +0 -41
- package/benchmarks/some.async.js +0 -19
- package/benchmarks/some.js +0 -19
- package/benchmarks/switchCase.async.js +0 -27
- package/benchmarks/switchCase.js +0 -55
- package/benchmarks/tap.js +0 -15
- package/benchmarks/thunkify.js +0 -15
- package/benchmarks/transform.async.js +0 -27
- package/benchmarks/transform.js +0 -40
- package/benchmarks/tryCatch.async.js +0 -25
- package/benchmarks/tryCatch.js +0 -32
- package/build +0 -472
- package/dist-test.js +0 -37
- package/examples/type-to-search-wiki/README.md +0 -19
- package/examples/type-to-search-wiki/package.json +0 -13
- package/examples/type-to-search-wiki/src/app.js +0 -46
- package/examples/type-to-search-wiki/src/index.html +0 -18
- package/import-test.html +0 -73
- package/memory-usage/reduce.js +0 -40
- package/rubico.js +0 -66
- package/test.js +0 -4242
- package/tmp.js +0 -1
package/.eslintrc.js
DELETED
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
'env': {
|
|
3
|
-
'browser': true,
|
|
4
|
-
'commonjs': true,
|
|
5
|
-
'es2020': true,
|
|
6
|
-
'node': true
|
|
7
|
-
},
|
|
8
|
-
'extends': 'eslint:recommended',
|
|
9
|
-
'parserOptions': {
|
|
10
|
-
'ecmaVersion': 11
|
|
11
|
-
},
|
|
12
|
-
'rules': {
|
|
13
|
-
'accessor-pairs': 'error',
|
|
14
|
-
'array-bracket-newline': 'off',
|
|
15
|
-
'array-bracket-spacing': [
|
|
16
|
-
'error',
|
|
17
|
-
'never'
|
|
18
|
-
],
|
|
19
|
-
'array-callback-return': 'error',
|
|
20
|
-
'array-element-newline': 'off',
|
|
21
|
-
'arrow-body-style': 'error',
|
|
22
|
-
'arrow-parens': [
|
|
23
|
-
'error',
|
|
24
|
-
'as-needed'
|
|
25
|
-
],
|
|
26
|
-
'arrow-spacing': [
|
|
27
|
-
'error',
|
|
28
|
-
{
|
|
29
|
-
'after': true,
|
|
30
|
-
'before': true
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
'block-scoped-var': 'error',
|
|
34
|
-
'block-spacing': [
|
|
35
|
-
'error',
|
|
36
|
-
'always'
|
|
37
|
-
],
|
|
38
|
-
'brace-style': 'off',
|
|
39
|
-
'callback-return': 'off',
|
|
40
|
-
'camelcase': 'off',
|
|
41
|
-
'capitalized-comments': 'off',
|
|
42
|
-
'class-methods-use-this': 'error',
|
|
43
|
-
'comma-dangle': 'off',
|
|
44
|
-
'comma-spacing': [
|
|
45
|
-
'error',
|
|
46
|
-
{
|
|
47
|
-
'after': true,
|
|
48
|
-
'before': false
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
'comma-style': [
|
|
52
|
-
'error',
|
|
53
|
-
'last'
|
|
54
|
-
],
|
|
55
|
-
'complexity': 'error',
|
|
56
|
-
'computed-property-spacing': [
|
|
57
|
-
'error',
|
|
58
|
-
'never'
|
|
59
|
-
],
|
|
60
|
-
'consistent-return': 'error',
|
|
61
|
-
'consistent-this': 'error',
|
|
62
|
-
'curly': 'off',
|
|
63
|
-
'default-case': 'error',
|
|
64
|
-
'default-case-last': 'error',
|
|
65
|
-
'default-param-last': 'error',
|
|
66
|
-
'dot-location': 'off',
|
|
67
|
-
'dot-notation': [
|
|
68
|
-
'error',
|
|
69
|
-
{
|
|
70
|
-
'allowKeywords': true
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
'eol-last': 'error',
|
|
74
|
-
'eqeqeq': 'off',
|
|
75
|
-
'func-call-spacing': 'error',
|
|
76
|
-
'func-name-matching': 'off',
|
|
77
|
-
'func-names': 'off',
|
|
78
|
-
'func-style': [
|
|
79
|
-
'error',
|
|
80
|
-
'expression'
|
|
81
|
-
],
|
|
82
|
-
'function-call-argument-newline': [
|
|
83
|
-
'error',
|
|
84
|
-
'consistent'
|
|
85
|
-
],
|
|
86
|
-
'function-paren-newline': 'off',
|
|
87
|
-
'generator-star-spacing': 'off',
|
|
88
|
-
'global-require': 'off',
|
|
89
|
-
'grouped-accessor-pairs': 'error',
|
|
90
|
-
'guard-for-in': 'off',
|
|
91
|
-
'handle-callback-err': 'error',
|
|
92
|
-
'id-blacklist': 'error',
|
|
93
|
-
'id-length': 'off',
|
|
94
|
-
'id-match': 'error',
|
|
95
|
-
'implicit-arrow-linebreak': [
|
|
96
|
-
'error',
|
|
97
|
-
'beside'
|
|
98
|
-
],
|
|
99
|
-
'indent': 'off',
|
|
100
|
-
'indent-legacy': 'off',
|
|
101
|
-
'init-declarations': 'error',
|
|
102
|
-
'jsx-quotes': 'error',
|
|
103
|
-
'key-spacing': 'error',
|
|
104
|
-
'keyword-spacing': [
|
|
105
|
-
'error',
|
|
106
|
-
{
|
|
107
|
-
'after': true,
|
|
108
|
-
'before': true
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
'line-comment-position': 'off',
|
|
112
|
-
'linebreak-style': [
|
|
113
|
-
'error',
|
|
114
|
-
'unix'
|
|
115
|
-
],
|
|
116
|
-
'lines-around-comment': 'error',
|
|
117
|
-
'lines-around-directive': 'error',
|
|
118
|
-
'lines-between-class-members': 'error',
|
|
119
|
-
'max-classes-per-file': 'error',
|
|
120
|
-
'max-depth': 'off',
|
|
121
|
-
'max-len': 'off',
|
|
122
|
-
'max-lines': 'off',
|
|
123
|
-
'max-lines-per-function': 'off',
|
|
124
|
-
'max-nested-callbacks': 'error',
|
|
125
|
-
'max-params': 'off',
|
|
126
|
-
'max-statements': 'off',
|
|
127
|
-
'max-statements-per-line': 'off',
|
|
128
|
-
'multiline-comment-style': 'off',
|
|
129
|
-
'multiline-ternary': 'off',
|
|
130
|
-
'new-cap': 'off',
|
|
131
|
-
'new-parens': 'error',
|
|
132
|
-
'newline-after-var': 'off',
|
|
133
|
-
'newline-before-return': 'off',
|
|
134
|
-
'newline-per-chained-call': 'error',
|
|
135
|
-
'no-alert': 'error',
|
|
136
|
-
'no-array-constructor': 'error',
|
|
137
|
-
'no-await-in-loop': 'off',
|
|
138
|
-
'no-bitwise': 'off',
|
|
139
|
-
'no-buffer-constructor': 'error',
|
|
140
|
-
'no-caller': 'error',
|
|
141
|
-
'no-catch-shadow': 'error',
|
|
142
|
-
'no-confusing-arrow': 'off',
|
|
143
|
-
'no-console': 'off',
|
|
144
|
-
'no-constant-condition': 'off',
|
|
145
|
-
'no-constructor-return': 'error',
|
|
146
|
-
'no-continue': 'off',
|
|
147
|
-
'no-div-regex': 'error',
|
|
148
|
-
'no-duplicate-imports': 'error',
|
|
149
|
-
'no-else-return': 'error',
|
|
150
|
-
'no-empty-function': 'off',
|
|
151
|
-
'no-eq-null': 'off',
|
|
152
|
-
'no-eval': 'error',
|
|
153
|
-
'no-extend-native': 'error',
|
|
154
|
-
'no-extra-bind': 'error',
|
|
155
|
-
'no-extra-label': 'error',
|
|
156
|
-
'no-extra-parens': 'off',
|
|
157
|
-
'no-floating-decimal': 'error',
|
|
158
|
-
'no-implicit-coercion': 'off',
|
|
159
|
-
'no-implicit-globals': 'error',
|
|
160
|
-
'no-implied-eval': 'error',
|
|
161
|
-
'no-inline-comments': 'off',
|
|
162
|
-
'no-invalid-this': 'error',
|
|
163
|
-
'no-iterator': 'error',
|
|
164
|
-
'no-label-var': 'error',
|
|
165
|
-
'no-labels': 'error',
|
|
166
|
-
'no-lone-blocks': 'error',
|
|
167
|
-
'no-lonely-if': 'error',
|
|
168
|
-
'no-loop-func': 'off',
|
|
169
|
-
'no-loss-of-precision': 'error',
|
|
170
|
-
'no-magic-numbers': 'off',
|
|
171
|
-
'no-mixed-operators': 'off',
|
|
172
|
-
'no-mixed-requires': 'error',
|
|
173
|
-
'no-multi-assign': 'error',
|
|
174
|
-
'no-multi-spaces': 'error',
|
|
175
|
-
'no-multi-str': 'error',
|
|
176
|
-
'no-multiple-empty-lines': 'error',
|
|
177
|
-
'no-native-reassign': 'error',
|
|
178
|
-
'no-negated-condition': 'error',
|
|
179
|
-
'no-negated-in-lhs': 'error',
|
|
180
|
-
'no-nested-ternary': 'off',
|
|
181
|
-
'no-new': 'error',
|
|
182
|
-
'no-new-func': 'error',
|
|
183
|
-
'no-new-object': 'error',
|
|
184
|
-
'no-new-require': 'error',
|
|
185
|
-
'no-new-wrappers': 'off',
|
|
186
|
-
'no-octal-escape': 'error',
|
|
187
|
-
'no-param-reassign': 'off',
|
|
188
|
-
'no-path-concat': 'error',
|
|
189
|
-
'no-plusplus': [
|
|
190
|
-
'off',
|
|
191
|
-
{
|
|
192
|
-
'allowForLoopAfterthoughts': true
|
|
193
|
-
}
|
|
194
|
-
],
|
|
195
|
-
'no-process-env': 'off',
|
|
196
|
-
'no-process-exit': 'error',
|
|
197
|
-
'no-promise-executor-return': 'off',
|
|
198
|
-
'no-proto': 'error',
|
|
199
|
-
'no-restricted-exports': 'error',
|
|
200
|
-
'no-restricted-globals': 'error',
|
|
201
|
-
'no-restricted-imports': 'error',
|
|
202
|
-
'no-restricted-modules': 'error',
|
|
203
|
-
'no-restricted-properties': 'error',
|
|
204
|
-
'no-restricted-syntax': 'error',
|
|
205
|
-
'no-return-assign': 'off',
|
|
206
|
-
'no-return-await': 'error',
|
|
207
|
-
'no-script-url': 'error',
|
|
208
|
-
'no-self-compare': 'off',
|
|
209
|
-
'no-sequences': 'off',
|
|
210
|
-
'no-shadow': 'off',
|
|
211
|
-
'no-spaced-func': 'error',
|
|
212
|
-
'no-sparse-arrays': 'off',
|
|
213
|
-
'no-sync': 'off',
|
|
214
|
-
'no-tabs': 'error',
|
|
215
|
-
'no-template-curly-in-string': 'error',
|
|
216
|
-
'no-ternary': 'off',
|
|
217
|
-
'no-throw-literal': 'error',
|
|
218
|
-
'no-trailing-spaces': 'error',
|
|
219
|
-
'no-undef': 'off',
|
|
220
|
-
'no-undef-init': 'error',
|
|
221
|
-
'no-undefined': 'off',
|
|
222
|
-
'no-underscore-dangle': 'off',
|
|
223
|
-
'no-unmodified-loop-condition': 'error',
|
|
224
|
-
'no-unneeded-ternary': 'error',
|
|
225
|
-
'no-unreachable-loop': 'off',
|
|
226
|
-
'no-unused-expressions': 'off',
|
|
227
|
-
'no-unused-vars': 'off',
|
|
228
|
-
'no-use-before-define': 'off',
|
|
229
|
-
'no-useless-backreference': 'error',
|
|
230
|
-
'no-useless-call': 'off',
|
|
231
|
-
'no-useless-computed-key': 'error',
|
|
232
|
-
'no-useless-concat': 'error',
|
|
233
|
-
'no-useless-constructor': 'error',
|
|
234
|
-
'no-useless-rename': 'error',
|
|
235
|
-
'no-useless-return': 'error',
|
|
236
|
-
'no-var': 'off',
|
|
237
|
-
'no-void': 'error',
|
|
238
|
-
'no-warning-comments': 'off',
|
|
239
|
-
'no-whitespace-before-property': 'error',
|
|
240
|
-
'nonblock-statement-body-position': 'error',
|
|
241
|
-
'object-curly-newline': 'error',
|
|
242
|
-
'object-curly-spacing': [
|
|
243
|
-
'error',
|
|
244
|
-
'always'
|
|
245
|
-
],
|
|
246
|
-
'object-shorthand': 'off',
|
|
247
|
-
'one-var': 'off',
|
|
248
|
-
'one-var-declaration-per-line': 'off',
|
|
249
|
-
'operator-assignment': 'off',
|
|
250
|
-
'operator-linebreak': 'off',
|
|
251
|
-
'padded-blocks': 'off',
|
|
252
|
-
'padding-line-between-statements': 'error',
|
|
253
|
-
'prefer-arrow-callback': 'off',
|
|
254
|
-
'prefer-const': 'error',
|
|
255
|
-
'prefer-destructuring': 'off',
|
|
256
|
-
'prefer-exponentiation-operator': 'error',
|
|
257
|
-
'prefer-named-capture-group': 'error',
|
|
258
|
-
'prefer-numeric-literals': 'error',
|
|
259
|
-
'prefer-object-spread': 'off',
|
|
260
|
-
'prefer-promise-reject-errors': 'error',
|
|
261
|
-
'prefer-reflect': 'off',
|
|
262
|
-
'prefer-regex-literals': 'error',
|
|
263
|
-
'prefer-rest-params': 'off',
|
|
264
|
-
'prefer-spread': 'off',
|
|
265
|
-
'prefer-template': 'error',
|
|
266
|
-
'quote-props': 'off',
|
|
267
|
-
'quotes': [
|
|
268
|
-
'error',
|
|
269
|
-
'single'
|
|
270
|
-
],
|
|
271
|
-
'radix': 'error',
|
|
272
|
-
'require-atomic-updates': 'error',
|
|
273
|
-
'require-await': 'off',
|
|
274
|
-
'require-jsdoc': 'error',
|
|
275
|
-
'require-unicode-regexp': 'off',
|
|
276
|
-
'require-yield': 'off',
|
|
277
|
-
'rest-spread-spacing': [
|
|
278
|
-
'error',
|
|
279
|
-
'never'
|
|
280
|
-
],
|
|
281
|
-
'semi': ['error', 'never'],
|
|
282
|
-
'semi-spacing': [
|
|
283
|
-
'error',
|
|
284
|
-
{
|
|
285
|
-
'after': true,
|
|
286
|
-
'before': false
|
|
287
|
-
}
|
|
288
|
-
],
|
|
289
|
-
'semi-style': 'error',
|
|
290
|
-
'sort-imports': 'error',
|
|
291
|
-
'sort-keys': 'off',
|
|
292
|
-
'sort-vars': 'off',
|
|
293
|
-
'space-before-blocks': 'off',
|
|
294
|
-
'space-before-function-paren': 'off',
|
|
295
|
-
'space-in-parens': [
|
|
296
|
-
'error',
|
|
297
|
-
'never'
|
|
298
|
-
],
|
|
299
|
-
'space-infix-ops': 'error',
|
|
300
|
-
'space-unary-ops': 'error',
|
|
301
|
-
'spaced-comment': [
|
|
302
|
-
'error',
|
|
303
|
-
'always'
|
|
304
|
-
],
|
|
305
|
-
'strict': 'off',
|
|
306
|
-
'switch-colon-spacing': 'error',
|
|
307
|
-
'symbol-description': 'error',
|
|
308
|
-
'template-curly-spacing': [
|
|
309
|
-
'error',
|
|
310
|
-
'never'
|
|
311
|
-
],
|
|
312
|
-
'template-tag-spacing': 'error',
|
|
313
|
-
'unicode-bom': [
|
|
314
|
-
'error',
|
|
315
|
-
'never'
|
|
316
|
-
],
|
|
317
|
-
'valid-jsdoc': 'off',
|
|
318
|
-
'vars-on-top': 'off',
|
|
319
|
-
'wrap-iife': [
|
|
320
|
-
'error',
|
|
321
|
-
'any'
|
|
322
|
-
],
|
|
323
|
-
'wrap-regex': 'error',
|
|
324
|
-
'yield-star-spacing': 'error',
|
|
325
|
-
'yoda': [
|
|
326
|
-
'error',
|
|
327
|
-
'never'
|
|
328
|
-
]
|
|
329
|
-
}
|
|
330
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
2
|
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
3
|
-
|
|
4
|
-
name: Node.js CI
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches: [ master ]
|
|
9
|
-
pull_request:
|
|
10
|
-
branches: [ master ]
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
build:
|
|
14
|
-
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
|
|
17
|
-
strategy:
|
|
18
|
-
matrix:
|
|
19
|
-
node-version: [16.x, 18.x, 20.x]
|
|
20
|
-
|
|
21
|
-
steps:
|
|
22
|
-
- uses: actions/checkout@v2
|
|
23
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
24
|
-
uses: actions/setup-node@v1
|
|
25
|
-
with:
|
|
26
|
-
node-version: ${{ matrix.node-version }}
|
|
27
|
-
- run: npm i && npx nyc --reporter=lcovonly npm test && npx codecov --token=8e8f60d5-69ac-4012-af67-66ad00f1a73c --file=coverage/lcov.info && npm run lint
|
package/.vscode/launch.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"name": "debug test",
|
|
9
|
-
"type": "node",
|
|
10
|
-
"request": "launch",
|
|
11
|
-
"runtimeExecutable": "npm",
|
|
12
|
-
"runtimeArgs": [
|
|
13
|
-
"run",
|
|
14
|
-
"test",
|
|
15
|
-
"--",
|
|
16
|
-
"--trace-warnings",
|
|
17
|
-
"--inspect-brk=9229"
|
|
18
|
-
],
|
|
19
|
-
"internalConsoleOptions": "openOnSessionStart",
|
|
20
|
-
"console": "integratedTerminal",
|
|
21
|
-
"cwd": "${workspaceRoot}",
|
|
22
|
-
"port": 9229
|
|
23
|
-
},
|
|
24
|
-
]
|
|
25
|
-
}
|
package/AggregateReducer.test.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
const assert = require('assert')
|
|
2
|
-
const reduce = require('./reduce')
|
|
3
|
-
const AggregateReducer = require('./AggregateReducer')
|
|
4
|
-
|
|
5
|
-
describe('AggregateReducer', () => {
|
|
6
|
-
it('Combines reducers', async () => {
|
|
7
|
-
const reducerA = (state, action) => {
|
|
8
|
-
if (action.type == 'A') {
|
|
9
|
-
return { ...state, A: true }
|
|
10
|
-
}
|
|
11
|
-
return state
|
|
12
|
-
}
|
|
13
|
-
const reducerB = (state, action) => {
|
|
14
|
-
if (action.type == 'B') {
|
|
15
|
-
return { ...state, B: true }
|
|
16
|
-
}
|
|
17
|
-
return state
|
|
18
|
-
}
|
|
19
|
-
const reducerC = (state, action) => {
|
|
20
|
-
if (action.type == 'C') {
|
|
21
|
-
return { ...state, C: true }
|
|
22
|
-
}
|
|
23
|
-
return state
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const combinedReducer = AggregateReducer([
|
|
27
|
-
reducerA,
|
|
28
|
-
reducerB,
|
|
29
|
-
reducerC,
|
|
30
|
-
])
|
|
31
|
-
|
|
32
|
-
const stateA = [{ type: 'A' }].reduce(combinedReducer, {})
|
|
33
|
-
assert.deepEqual(stateA, { A: true })
|
|
34
|
-
|
|
35
|
-
const stateAB = [{ type: 'A' }, { type: 'B' }].reduce(combinedReducer, {})
|
|
36
|
-
assert.deepEqual(stateAB, { A: true, B: true })
|
|
37
|
-
|
|
38
|
-
const stateABC = [{ type: 'A' }, { type: 'B' }, { type: 'C' }].reduce(combinedReducer, {})
|
|
39
|
-
assert.deepEqual(stateABC, { A: true, B: true, C: true })
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
it('Combines async reducers', async () => {
|
|
43
|
-
const reducerA = async (state, action) => {
|
|
44
|
-
if (action.type == 'A') {
|
|
45
|
-
return { ...state, A: true }
|
|
46
|
-
}
|
|
47
|
-
return state
|
|
48
|
-
}
|
|
49
|
-
const reducerB = async (state, action) => {
|
|
50
|
-
if (action.type == 'B') {
|
|
51
|
-
return { ...state, B: true }
|
|
52
|
-
}
|
|
53
|
-
return state
|
|
54
|
-
}
|
|
55
|
-
const reducerC = async (state, action) => {
|
|
56
|
-
if (action.type == 'C') {
|
|
57
|
-
return { ...state, C: true }
|
|
58
|
-
}
|
|
59
|
-
return state
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const combinedReducer = AggregateReducer([
|
|
63
|
-
reducerA,
|
|
64
|
-
reducerB,
|
|
65
|
-
reducerC,
|
|
66
|
-
])
|
|
67
|
-
|
|
68
|
-
const stateA = await reduce([{ type: 'A' }], combinedReducer, {})
|
|
69
|
-
assert.deepEqual(stateA, { A: true })
|
|
70
|
-
|
|
71
|
-
const stateAB = await reduce([{ type: 'A' }, { type: 'B' }], combinedReducer, {})
|
|
72
|
-
assert.deepEqual(stateAB, { A: true, B: true })
|
|
73
|
-
|
|
74
|
-
const stateABC = await reduce([{ type: 'A' }, { type: 'B' }, { type: 'C' }], combinedReducer, {})
|
|
75
|
-
assert.deepEqual(stateABC, { A: true, B: true, C: true })
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
it('Identity', async () => {
|
|
79
|
-
const identity = AggregateReducer([])
|
|
80
|
-
assert.equal(1, identity(1))
|
|
81
|
-
})
|
|
82
|
-
})
|