@asd14/m 8.0.0 → 9.0.0
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 +73 -28
- package/dist/src/all/all.d.ts +53 -0
- package/dist/src/all/all.js +59 -0
- package/dist/src/all/with/all-with.d.ts +47 -0
- package/dist/src/all/with/all-with.js +59 -0
- package/dist/src/any/any.d.ts +62 -0
- package/dist/src/any/any.js +68 -0
- package/dist/src/any/with/any-with.d.ts +47 -0
- package/dist/src/any/with/any-with.js +59 -0
- package/dist/src/converge/converge.d.ts +89 -0
- package/dist/src/converge/converge.js +68 -0
- package/dist/src/count/by/count-by.d.ts +55 -0
- package/dist/src/count/by/count-by.js +62 -0
- package/dist/src/count/count.d.ts +39 -0
- package/dist/src/count/count.js +39 -0
- package/dist/src/count/with/count-with.d.ts +46 -0
- package/dist/src/count/with/count-with.js +59 -0
- package/dist/src/curry/curry.d.ts +43 -0
- package/dist/src/curry/curry.js +52 -0
- package/dist/src/debounce/debounce.d.ts +39 -0
- package/dist/src/debounce/debounce.js +63 -0
- package/dist/src/dec/dec.d.ts +22 -0
- package/dist/src/dec/dec.js +27 -0
- package/dist/src/default-to/default-to.d.ts +44 -0
- package/dist/src/default-to/default-to.js +46 -0
- package/dist/src/distinct/by/distinct-by.d.ts +49 -0
- package/dist/src/distinct/by/distinct-by.js +74 -0
- package/dist/src/distinct/distinct.d.ts +32 -0
- package/dist/src/distinct/distinct.js +39 -0
- package/dist/src/drop/last/drop-last.d.ts +37 -0
- package/dist/src/drop/last/drop-last.js +55 -0
- package/dist/src/escape/escape.d.ts +35 -0
- package/dist/src/escape/escape.js +47 -0
- package/dist/src/escape/html/escape-html.d.ts +26 -0
- package/dist/src/escape/html/escape-html.js +38 -0
- package/dist/src/escape/reg-exp/escape-reg-exp.d.ts +30 -0
- package/dist/src/escape/reg-exp/escape-reg-exp.js +34 -0
- package/dist/src/evolve/deep-by/evolve-deep-by.d.ts +65 -0
- package/dist/src/evolve/deep-by/evolve-deep-by.js +90 -0
- package/dist/src/evolve/evolve.d.ts +61 -0
- package/dist/src/evolve/evolve.js +66 -0
- package/dist/src/evolve/many/evolve-many.d.ts +46 -0
- package/dist/src/evolve/many/evolve-many.js +62 -0
- package/dist/src/evolve/with/evolve-with.d.ts +63 -0
- package/dist/src/evolve/with/evolve-with.js +84 -0
- package/dist/src/filter/filter.d.ts +56 -0
- package/dist/src/filter/filter.js +63 -0
- package/dist/src/filter/with/filter-with.d.ts +46 -0
- package/dist/src/filter/with/filter-with.js +59 -0
- package/dist/src/find/find.d.ts +57 -0
- package/dist/src/find/find.js +64 -0
- package/dist/src/find/index/find-index.d.ts +57 -0
- package/dist/src/find/index/find-index.js +64 -0
- package/dist/src/find/index/with/find-index-with.d.ts +47 -0
- package/dist/src/find/index/with/find-index-with.js +60 -0
- package/dist/src/find/with/find-with.d.ts +47 -0
- package/dist/src/find/with/find-with.js +60 -0
- package/dist/src/first/first.d.ts +37 -0
- package/dist/src/first/first.js +38 -0
- package/dist/src/flatten/flatten.d.ts +65 -0
- package/dist/src/flatten/flatten.js +107 -0
- package/dist/src/for-each/for-each.d.ts +49 -0
- package/dist/src/for-each/for-each.js +56 -0
- package/dist/src/fuzzy-match/fuzzy-match.d.ts +49 -0
- package/dist/src/fuzzy-match/fuzzy-match.js +164 -0
- package/dist/src/group/group-by.d.ts +66 -0
- package/dist/src/group/group-by.js +79 -0
- package/dist/src/i/i.d.ts +23 -0
- package/dist/src/i/i.js +22 -0
- package/dist/src/inc/inc.d.ts +22 -0
- package/dist/src/inc/inc.js +27 -0
- package/dist/src/index.d.ts +79 -0
- package/dist/src/index.js +117 -0
- package/dist/src/is/is.d.ts +177 -0
- package/dist/src/is/is.js +173 -0
- package/dist/src/is-deep-equal/is-deep-equal.d.ts +39 -0
- package/dist/src/is-deep-equal/is-deep-equal.js +141 -0
- package/dist/src/is-equal/is-equal.d.ts +33 -0
- package/dist/src/is-equal/is-equal.js +35 -0
- package/dist/src/is-match/is-match.d.ts +64 -0
- package/dist/src/is-match/is-match.js +69 -0
- package/dist/src/is-uri/is-uri.d.ts +29 -0
- package/dist/src/is-uri/is-uri.js +84 -0
- package/dist/src/join/join.d.ts +33 -0
- package/dist/src/join/join.js +45 -0
- package/dist/src/keys/keys.d.ts +29 -0
- package/dist/src/keys/keys.js +35 -0
- package/dist/src/last/last.d.ts +37 -0
- package/dist/src/last/last.js +38 -0
- package/dist/src/map/indexed/map-indexed.d.ts +54 -0
- package/dist/src/map/indexed/map-indexed.js +61 -0
- package/dist/src/map/map.d.ts +51 -0
- package/dist/src/map/map.js +57 -0
- package/dist/src/map/matrix/map-matrix.d.ts +55 -0
- package/dist/src/map/matrix/map-matrix.js +67 -0
- package/dist/src/merge/by/merge-by.d.ts +48 -0
- package/dist/src/merge/by/merge-by.js +73 -0
- package/dist/src/merge/merge.d.ts +48 -0
- package/dist/src/merge/merge.js +81 -0
- package/dist/src/partition/partition.d.ts +59 -0
- package/dist/src/partition/partition.js +72 -0
- package/dist/src/partition/with/partition-with.d.ts +45 -0
- package/dist/src/partition/with/partition-with.js +58 -0
- package/dist/src/pick/pick.d.ts +39 -0
- package/dist/src/pick/pick.js +59 -0
- package/dist/src/pipe/pipe.d.ts +89 -0
- package/dist/src/pipe/pipe.js +50 -0
- package/dist/src/pipe/promise/pipe-p.d.ts +33 -0
- package/dist/src/pipe/promise/pipe-p.js +44 -0
- package/dist/src/push/push.d.ts +28 -0
- package/dist/src/push/push.js +38 -0
- package/dist/src/read/read.d.ts +55 -0
- package/dist/src/read/read.js +79 -0
- package/dist/src/reduce/reduce.d.ts +40 -0
- package/dist/src/reduce/reduce.js +58 -0
- package/dist/src/remove/remove.d.ts +32 -0
- package/dist/src/remove/remove.js +48 -0
- package/dist/src/remove/with/remove-with.d.ts +44 -0
- package/dist/src/remove/with/remove-with.js +62 -0
- package/dist/src/sort/by/sort-by.d.ts +34 -0
- package/dist/src/sort/by/sort-by.js +46 -0
- package/dist/src/sort/sort.d.ts +43 -0
- package/dist/src/sort/sort.js +72 -0
- package/dist/src/sort/with/sort-with.d.ts +58 -0
- package/dist/src/sort/with/sort-with.js +126 -0
- package/dist/src/split/split.d.ts +33 -0
- package/dist/src/split/split.js +45 -0
- package/dist/src/split-in-groups-of/split-in-groups-of.d.ts +34 -0
- package/dist/src/split-in-groups-of/split-in-groups-of.js +53 -0
- package/dist/src/sum/sum.d.ts +28 -0
- package/dist/src/sum/sum.js +34 -0
- package/dist/src/throttle/throttle.d.ts +46 -0
- package/dist/src/throttle/throttle.js +90 -0
- package/dist/src/to-string/to-string.d.ts +28 -0
- package/dist/src/to-string/to-string.js +27 -0
- package/dist/src/trim/trim.d.ts +48 -0
- package/dist/src/trim/trim.js +79 -0
- package/dist/src/type/type.d.ts +28 -0
- package/dist/src/type/type.js +35 -0
- package/dist/src/unflatten/unflatten.d.ts +44 -0
- package/dist/src/unflatten/unflatten.js +88 -0
- package/dist/src/unite/by/unite-by.d.ts +43 -0
- package/dist/src/unite/by/unite-by.js +63 -0
- package/dist/src/unite/unite.d.ts +42 -0
- package/dist/src/unite/unite.js +58 -0
- package/dist/src/update/update.d.ts +57 -0
- package/dist/src/update/update.js +62 -0
- package/dist/src/update/with/update-with.d.ts +63 -0
- package/dist/src/update/with/update-with.js +84 -0
- package/dist/src/upsert/with/upsert-with.d.ts +57 -0
- package/dist/src/upsert/with/upsert-with.js +87 -0
- package/dist/src/utils/build-match.d.ts +25 -0
- package/dist/src/utils/build-match.js +56 -0
- package/dist/src/utils/build-patch.d.ts +32 -0
- package/dist/src/utils/build-patch.js +59 -0
- package/dist/src/utils/pipe.d.ts +11 -0
- package/dist/src/utils/pipe.js +15 -0
- package/dist/src/utils/set-own.d.ts +20 -0
- package/dist/src/utils/set-own.js +29 -0
- package/dist/src/utils/to-function.d.ts +22 -0
- package/dist/src/utils/to-function.js +32 -0
- package/dist/src/when/when.d.ts +54 -0
- package/dist/src/when/when.js +70 -0
- package/dist/src/zip-to-object/zip-to-object.d.ts +39 -0
- package/dist/src/zip-to-object/zip-to-object.js +58 -0
- package/dist/types/array.d.ts +25 -0
- package/dist/types/basic.d.ts +3 -0
- package/dist/types/function.d.ts +42 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/object.d.ts +70 -0
- package/dist/types/object.matcher.d.ts +22 -0
- package/dist/types/object.patcher.d.ts +34 -0
- package/docs/DECISIONS.md +7 -0
- package/docs/SPEC.md +195 -0
- package/docs/decisions/01.use-manual-currying.md +34 -0
- package/docs/decisions/02.add-runtime-type-checks.md +27 -0
- package/docs/decisions/03.use-c8-over-node-test-runner.md +30 -0
- package/docs/decisions/04.use-relative-types-imports.md +26 -0
- package/docs/decisions/05.read-an-array-as-a-pipe.md +37 -0
- package/docs/explanation/curried-type-inference.md +136 -0
- package/docs/how-to/jsdoc.md +94 -0
- package/docs/how-to/pipe-arrays.md +104 -0
- package/docs/how-to/tape-runtime-tests.md +206 -0
- package/docs/how-to/tstyche-type-tests.md +146 -0
- package/docs/how-to/writing-functions.md +249 -0
- package/docs/spec/pending.md +18 -0
- package/package.json +76 -52
- package/dist/all/all.js +0 -68
- package/dist/all/all.js.map +0 -1
- package/dist/all/all.test.js +0 -66
- package/dist/all/all.test.js.map +0 -1
- package/dist/any/any.js +0 -71
- package/dist/any/any.js.map +0 -1
- package/dist/any/any.test.js +0 -60
- package/dist/any/any.test.js.map +0 -1
- package/dist/append/append.js +0 -31
- package/dist/append/append.js.map +0 -1
- package/dist/append/append.test.js +0 -41
- package/dist/append/append.test.js.map +0 -1
- package/dist/bottom/bottom.js +0 -52
- package/dist/bottom/bottom.js.map +0 -1
- package/dist/bottom/bottom.test.js +0 -57
- package/dist/bottom/bottom.test.js.map +0 -1
- package/dist/cases/cases.js +0 -32
- package/dist/cases/cases.js.map +0 -1
- package/dist/cases/cases.test.js +0 -71
- package/dist/cases/cases.test.js.map +0 -1
- package/dist/clone/clone.js +0 -48
- package/dist/clone/clone.js.map +0 -1
- package/dist/clone/clone.test.js +0 -45
- package/dist/clone/clone.test.js.map +0 -1
- package/dist/compact/compact.js +0 -80
- package/dist/compact/compact.js.map +0 -1
- package/dist/compact/compact.test.js +0 -88
- package/dist/compact/compact.test.js.map +0 -1
- package/dist/contains/contains.js +0 -24
- package/dist/contains/contains.js.map +0 -1
- package/dist/contains/contains.test.js +0 -11
- package/dist/contains/contains.test.js.map +0 -1
- package/dist/converge/converge.js +0 -62
- package/dist/converge/converge.js.map +0 -1
- package/dist/converge/converge.test.js +0 -69
- package/dist/converge/converge.test.js.map +0 -1
- package/dist/count/count.js +0 -113
- package/dist/count/count.js.map +0 -1
- package/dist/count/count.test.js +0 -105
- package/dist/count/count.test.js.map +0 -1
- package/dist/curry/curry.js +0 -39
- package/dist/curry/curry.js.map +0 -1
- package/dist/curry/curry.test.js +0 -13
- package/dist/curry/curry.test.js.map +0 -1
- package/dist/debounce/debounce.js +0 -36
- package/dist/debounce/debounce.js.map +0 -1
- package/dist/debounce/debounce.test.js +0 -49
- package/dist/debounce/debounce.test.js.map +0 -1
- package/dist/dec/dec.js +0 -18
- package/dist/dec/dec.js.map +0 -1
- package/dist/dec/dec.test.js +0 -8
- package/dist/dec/dec.test.js.map +0 -1
- package/dist/deep-equal/deep-equal.bench.js +0 -123
- package/dist/deep-equal/deep-equal.bench.js.map +0 -1
- package/dist/deep-equal/deep-equal.js +0 -47
- package/dist/deep-equal/deep-equal.js.map +0 -1
- package/dist/deep-equal/deep-equal.own.js +0 -97
- package/dist/deep-equal/deep-equal.own.js.map +0 -1
- package/dist/deep-equal/deep-equal.test.js +0 -131
- package/dist/deep-equal/deep-equal.test.js.map +0 -1
- package/dist/distinct/distinct.bench.js +0 -56
- package/dist/distinct/distinct.bench.js.map +0 -1
- package/dist/distinct/distinct.js +0 -36
- package/dist/distinct/distinct.js.map +0 -1
- package/dist/distinct/distinct.test.js +0 -43
- package/dist/distinct/distinct.test.js.map +0 -1
- package/dist/drop-last/drop-last.js +0 -23
- package/dist/drop-last/drop-last.js.map +0 -1
- package/dist/drop-last/drop-last.test.js +0 -38
- package/dist/drop-last/drop-last.test.js.map +0 -1
- package/dist/elapsed-time/elapsed-time.js +0 -42
- package/dist/elapsed-time/elapsed-time.js.map +0 -1
- package/dist/elapsed-time/elapsed-time.test.js +0 -13
- package/dist/elapsed-time/elapsed-time.test.js.map +0 -1
- package/dist/ends-with/ends-with.js +0 -36
- package/dist/ends-with/ends-with.js.map +0 -1
- package/dist/ends-with/ends-with.test.js +0 -33
- package/dist/ends-with/ends-with.test.js.map +0 -1
- package/dist/escape/escape.js +0 -7
- package/dist/escape/escape.js.map +0 -1
- package/dist/escape-html/escape-html.js +0 -14
- package/dist/escape-html/escape-html.js.map +0 -1
- package/dist/escape-html/escape-html.test.js +0 -10
- package/dist/escape-html/escape-html.test.js.map +0 -1
- package/dist/escape-reg-exp/escape-reg-exp.js +0 -17
- package/dist/escape-reg-exp/escape-reg-exp.js.map +0 -1
- package/dist/escape-reg-exp/escape-reg-exp.test.js +0 -13
- package/dist/escape-reg-exp/escape-reg-exp.test.js.map +0 -1
- package/dist/filter/filter.js +0 -45
- package/dist/filter/filter.js.map +0 -1
- package/dist/filter/filter.test.js +0 -101
- package/dist/filter/filter.test.js.map +0 -1
- package/dist/find/find.js +0 -93
- package/dist/find/find.js.map +0 -1
- package/dist/find/find.test.js +0 -77
- package/dist/find/find.test.js.map +0 -1
- package/dist/find-index/find-index.js +0 -43
- package/dist/find-index/find-index.js.map +0 -1
- package/dist/find-index/find-index.test.js +0 -53
- package/dist/find-index/find-index.test.js.map +0 -1
- package/dist/first/first.js +0 -21
- package/dist/first/first.js.map +0 -1
- package/dist/first/first.test.js +0 -17
- package/dist/first/first.test.js.map +0 -1
- package/dist/flatten/flatten.js +0 -46
- package/dist/flatten/flatten.js.map +0 -1
- package/dist/flatten/flatten.test.js +0 -63
- package/dist/flatten/flatten.test.js.map +0 -1
- package/dist/for-each/for-each.js +0 -25
- package/dist/for-each/for-each.js.map +0 -1
- package/dist/for-each/for-each.test.js +0 -41
- package/dist/for-each/for-each.test.js.map +0 -1
- package/dist/group-by/group-by.js +0 -38
- package/dist/group-by/group-by.js.map +0 -1
- package/dist/group-by/group-by.test.js +0 -86
- package/dist/group-by/group-by.test.js.map +0 -1
- package/dist/gt/gt.js +0 -25
- package/dist/gt/gt.js.map +0 -1
- package/dist/gt/gt.test.js +0 -11
- package/dist/gt/gt.test.js.map +0 -1
- package/dist/has-key/has-key.js +0 -8
- package/dist/has-key/has-key.js.map +0 -1
- package/dist/has-key/has-key.test.js +0 -14
- package/dist/has-key/has-key.test.js.map +0 -1
- package/dist/hist/hist.js +0 -73
- package/dist/hist/hist.js.map +0 -1
- package/dist/hist/hist.test.js +0 -47
- package/dist/hist/hist.test.js.map +0 -1
- package/dist/i/i.js +0 -11
- package/dist/i/i.js.map +0 -1
- package/dist/i/i.test.js +0 -21
- package/dist/i/i.test.js.map +0 -1
- package/dist/inc/inc.js +0 -18
- package/dist/inc/inc.js.map +0 -1
- package/dist/inc/inc.test.js +0 -8
- package/dist/inc/inc.test.js.map +0 -1
- package/dist/index-by/index-by.js +0 -36
- package/dist/index-by/index-by.js.map +0 -1
- package/dist/index-by/index-by.test.js +0 -48
- package/dist/index-by/index-by.test.js.map +0 -1
- package/dist/index.js +0 -99
- package/dist/index.js.map +0 -1
- package/dist/index.test.js +0 -10
- package/dist/index.test.js.map +0 -1
- package/dist/intersect/intersect.js +0 -113
- package/dist/intersect/intersect.js.map +0 -1
- package/dist/intersect/intersect.test.js +0 -79
- package/dist/intersect/intersect.test.js.map +0 -1
- package/dist/is/is.js +0 -40
- package/dist/is/is.js.map +0 -1
- package/dist/is/is.test.js +0 -28
- package/dist/is/is.test.js.map +0 -1
- package/dist/is-between/is-between.js +0 -30
- package/dist/is-between/is-between.js.map +0 -1
- package/dist/is-between/is-between.test.js +0 -18
- package/dist/is-between/is-between.test.js.map +0 -1
- package/dist/is-empty/is-empty.js +0 -53
- package/dist/is-empty/is-empty.js.map +0 -1
- package/dist/is-empty/is-empty.test.js +0 -35
- package/dist/is-empty/is-empty.test.js.map +0 -1
- package/dist/is-equal/is-equal.js +0 -31
- package/dist/is-equal/is-equal.js.map +0 -1
- package/dist/is-equal/is-equal.test.js +0 -22
- package/dist/is-equal/is-equal.test.js.map +0 -1
- package/dist/is-match/is-match.js +0 -58
- package/dist/is-match/is-match.js.map +0 -1
- package/dist/is-match/is-match.test.js +0 -72
- package/dist/is-match/is-match.test.js.map +0 -1
- package/dist/is-uri/is-uri.js +0 -24
- package/dist/is-uri/is-uri.js.map +0 -1
- package/dist/is-uri/is-uri.test.js +0 -16
- package/dist/is-uri/is-uri.test.js.map +0 -1
- package/dist/join/join.js +0 -74
- package/dist/join/join.js.map +0 -1
- package/dist/join/join.test.js +0 -99
- package/dist/join/join.test.js.map +0 -1
- package/dist/keys/keys.js +0 -56
- package/dist/keys/keys.js.map +0 -1
- package/dist/keys/keys.test.js +0 -25
- package/dist/keys/keys.test.js.map +0 -1
- package/dist/last/last.js +0 -22
- package/dist/last/last.js.map +0 -1
- package/dist/last/last.test.js +0 -18
- package/dist/last/last.test.js.map +0 -1
- package/dist/lt/lt.js +0 -27
- package/dist/lt/lt.js.map +0 -1
- package/dist/lt/lt.test.js +0 -10
- package/dist/lt/lt.test.js.map +0 -1
- package/dist/map/map.js +0 -40
- package/dist/map/map.js.map +0 -1
- package/dist/map/map.test.js +0 -66
- package/dist/map/map.test.js.map +0 -1
- package/dist/map-matrix/map-matrix.js +0 -43
- package/dist/map-matrix/map-matrix.js.map +0 -1
- package/dist/map-matrix/map-matrix.test.js +0 -82
- package/dist/map-matrix/map-matrix.test.js.map +0 -1
- package/dist/max/max.js +0 -60
- package/dist/max/max.js.map +0 -1
- package/dist/max/max.test.js +0 -50
- package/dist/max/max.test.js.map +0 -1
- package/dist/merge/merge.js +0 -79
- package/dist/merge/merge.js.map +0 -1
- package/dist/merge/merge.test.js +0 -61
- package/dist/merge/merge.test.js.map +0 -1
- package/dist/min/min.js +0 -60
- package/dist/min/min.js.map +0 -1
- package/dist/min/min.test.js +0 -45
- package/dist/min/min.test.js.map +0 -1
- package/dist/move/move.js +0 -48
- package/dist/move/move.js.map +0 -1
- package/dist/move/move.test.js +0 -62
- package/dist/move/move.test.js.map +0 -1
- package/dist/mutate/mutate.js +0 -89
- package/dist/mutate/mutate.js.map +0 -1
- package/dist/mutate/mutate.test.js +0 -114
- package/dist/mutate/mutate.test.js.map +0 -1
- package/dist/page/page.js +0 -26
- package/dist/page/page.js.map +0 -1
- package/dist/page/page.test.js +0 -70
- package/dist/page/page.test.js.map +0 -1
- package/dist/partition/partition.js +0 -60
- package/dist/partition/partition.js.map +0 -1
- package/dist/partition/partition.test.js +0 -104
- package/dist/partition/partition.test.js.map +0 -1
- package/dist/pick/pick.js +0 -42
- package/dist/pick/pick.js.map +0 -1
- package/dist/pick/pick.test.js +0 -26
- package/dist/pick/pick.test.js.map +0 -1
- package/dist/pipe/pipe.js +0 -37
- package/dist/pipe/pipe.js.map +0 -1
- package/dist/pipe/pipe.test.js +0 -15
- package/dist/pipe/pipe.test.js.map +0 -1
- package/dist/pipe-p/pipe-p.js +0 -47
- package/dist/pipe-p/pipe-p.js.map +0 -1
- package/dist/pipe-p/pipe-p.test.js +0 -27
- package/dist/pipe-p/pipe-p.test.js.map +0 -1
- package/dist/pluck/pluck.js +0 -65
- package/dist/pluck/pluck.js.map +0 -1
- package/dist/pluck/pluck.test.js +0 -61
- package/dist/pluck/pluck.test.js.map +0 -1
- package/dist/prepend/prepend.js +0 -28
- package/dist/prepend/prepend.js.map +0 -1
- package/dist/prepend/prepend.test.js +0 -41
- package/dist/prepend/prepend.test.js.map +0 -1
- package/dist/proto-chain/proto-chain.js +0 -21
- package/dist/proto-chain/proto-chain.js.map +0 -1
- package/dist/proto-chain/proto-chain.test.js +0 -25
- package/dist/proto-chain/proto-chain.test.js.map +0 -1
- package/dist/push/push.js +0 -27
- package/dist/push/push.js.map +0 -1
- package/dist/push/push.test.js +0 -22
- package/dist/push/push.test.js.map +0 -1
- package/dist/raise/raise.js +0 -6
- package/dist/raise/raise.js.map +0 -1
- package/dist/raise/raise.test.js +0 -10
- package/dist/raise/raise.test.js.map +0 -1
- package/dist/random/random.js +0 -13
- package/dist/random/random.js.map +0 -1
- package/dist/random/random.test.js +0 -21
- package/dist/random/random.test.js.map +0 -1
- package/dist/read/read.js +0 -80
- package/dist/read/read.js.map +0 -1
- package/dist/read/read.test.js +0 -110
- package/dist/read/read.test.js.map +0 -1
- package/dist/reduce/reduce.js +0 -49
- package/dist/reduce/reduce.js.map +0 -1
- package/dist/reduce/reduce.test.js +0 -49
- package/dist/reduce/reduce.test.js.map +0 -1
- package/dist/remove/remove.js +0 -90
- package/dist/remove/remove.js.map +0 -1
- package/dist/remove/remove.test.js +0 -98
- package/dist/remove/remove.test.js.map +0 -1
- package/dist/rename/rename.js +0 -77
- package/dist/rename/rename.js.map +0 -1
- package/dist/rename/rename.test.js +0 -49
- package/dist/rename/rename.test.js.map +0 -1
- package/dist/rename-file/rename-file.js +0 -23
- package/dist/rename-file/rename-file.js.map +0 -1
- package/dist/rename-file/rename-file.test.js +0 -13
- package/dist/rename-file/rename-file.test.js.map +0 -1
- package/dist/repeat/repeat.js +0 -46
- package/dist/repeat/repeat.js.map +0 -1
- package/dist/repeat/repeat.test.js +0 -33
- package/dist/repeat/repeat.test.js.map +0 -1
- package/dist/replace/replace.js +0 -102
- package/dist/replace/replace.js.map +0 -1
- package/dist/replace/replace.test.js +0 -132
- package/dist/replace/replace.test.js.map +0 -1
- package/dist/same/same.js +0 -13
- package/dist/same/same.js.map +0 -1
- package/dist/same/same.test.js +0 -9
- package/dist/same/same.test.js.map +0 -1
- package/dist/sequence/sequence.js +0 -36
- package/dist/sequence/sequence.js.map +0 -1
- package/dist/sequence/sequence.test.js +0 -139
- package/dist/sequence/sequence.test.js.map +0 -1
- package/dist/sort/sort-with.js +0 -130
- package/dist/sort/sort-with.js.map +0 -1
- package/dist/sort/sort.js +0 -70
- package/dist/sort/sort.js.map +0 -1
- package/dist/sort/sort.test.js +0 -413
- package/dist/sort/sort.test.js.map +0 -1
- package/dist/split/split.js +0 -44
- package/dist/split/split.js.map +0 -1
- package/dist/split/split.test.js +0 -32
- package/dist/split/split.test.js.map +0 -1
- package/dist/split-in-groups-of/split-in-groups-of.js +0 -49
- package/dist/split-in-groups-of/split-in-groups-of.js.map +0 -1
- package/dist/split-in-groups-of/split-in-groups-of.test.js +0 -87
- package/dist/split-in-groups-of/split-in-groups-of.test.js.map +0 -1
- package/dist/spy/spy.js +0 -35
- package/dist/spy/spy.js.map +0 -1
- package/dist/spy/spy.test.js +0 -37
- package/dist/spy/spy.test.js.map +0 -1
- package/dist/starts-with/starts-with.js +0 -35
- package/dist/starts-with/starts-with.js.map +0 -1
- package/dist/starts-with/starts-with.test.js +0 -37
- package/dist/starts-with/starts-with.test.js.map +0 -1
- package/dist/throttle/throttle.js +0 -47
- package/dist/throttle/throttle.js.map +0 -1
- package/dist/throttle/throttle.test.js +0 -41
- package/dist/throttle/throttle.test.js.map +0 -1
- package/dist/to-lower/to-lower.js +0 -21
- package/dist/to-lower/to-lower.js.map +0 -1
- package/dist/to-lower/to-lower.test.js +0 -9
- package/dist/to-lower/to-lower.test.js.map +0 -1
- package/dist/to-upper/to-upper.js +0 -21
- package/dist/to-upper/to-upper.js.map +0 -1
- package/dist/to-upper/to-upper.test.js +0 -9
- package/dist/to-upper/to-upper.test.js.map +0 -1
- package/dist/toggle/toggle.js +0 -35
- package/dist/toggle/toggle.js.map +0 -1
- package/dist/toggle/toggle.test.js +0 -28
- package/dist/toggle/toggle.test.js.map +0 -1
- package/dist/top/top.js +0 -62
- package/dist/top/top.js.map +0 -1
- package/dist/top/top.test.js +0 -51
- package/dist/top/top.test.js.map +0 -1
- package/dist/trim/trim.js +0 -41
- package/dist/trim/trim.js.map +0 -1
- package/dist/trim/trim.test.js +0 -10
- package/dist/trim/trim.test.js.map +0 -1
- package/dist/try-catch/try-catch.js +0 -37
- package/dist/try-catch/try-catch.js.map +0 -1
- package/dist/try-catch/try-catch.test.js +0 -14
- package/dist/try-catch/try-catch.test.js.map +0 -1
- package/dist/type/type.js +0 -29
- package/dist/type/type.js.map +0 -1
- package/dist/type/type.test.js +0 -19
- package/dist/type/type.test.js.map +0 -1
- package/dist/unite/unite.js +0 -22
- package/dist/unite/unite.js.map +0 -1
- package/dist/unite/unite.test.js +0 -12
- package/dist/unite/unite.test.js.map +0 -1
- package/dist/update/update.js +0 -85
- package/dist/update/update.js.map +0 -1
- package/dist/update/update.test.js +0 -99
- package/dist/update/update.test.js.map +0 -1
- package/dist/upsert/upsert.js +0 -19
- package/dist/upsert/upsert.js.map +0 -1
- package/dist/upsert/upsert.test.js +0 -61
- package/dist/upsert/upsert.test.js.map +0 -1
- package/dist/values/values.js +0 -60
- package/dist/values/values.js.map +0 -1
- package/dist/values/values.test.js +0 -25
- package/dist/values/values.test.js.map +0 -1
- package/dist/when/when.js +0 -51
- package/dist/when/when.js.map +0 -1
- package/dist/when/when.test.js +0 -30
- package/dist/when/when.test.js.map +0 -1
- package/dist/write/write.js +0 -28
- package/dist/write/write.js.map +0 -1
- package/dist/write/write.test.js +0 -18
- package/dist/write/write.test.js.map +0 -1
- package/dist/zip-to-object/zip-to-object.js +0 -28
- package/dist/zip-to-object/zip-to-object.js.map +0 -1
- package/dist/zip-to-object/zip-to-object.test.js +0 -33
- package/dist/zip-to-object/zip-to-object.test.js.map +0 -1
package/dist/reduce/reduce.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
|
|
2
|
-
import { pipe } from "../pipe/pipe.js";
|
|
3
|
-
var _reduce = function(_fn, defaultAcc, _input) {
|
|
4
|
-
var acc = defaultAcc;
|
|
5
|
-
var input = Array.isArray(_input) ? _input : [
|
|
6
|
-
_input
|
|
7
|
-
];
|
|
8
|
-
var fn = Array.isArray(_fn) ? pipe.apply(void 0, _to_consumable_array(_fn)) : _fn;
|
|
9
|
-
for(var index = 0, length = input.length; index < length; index++){
|
|
10
|
-
acc = fn(acc, input[index], index, input);
|
|
11
|
-
}
|
|
12
|
-
return acc;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Apply a function against an accumulator and each element in the array (from
|
|
16
|
-
* left to right) to reduce it to a single value.
|
|
17
|
-
*
|
|
18
|
-
* @param {Function} fn Reduce function
|
|
19
|
-
* @param {Object} defaultAcc Default accumulator value
|
|
20
|
-
* @param {Array} input Source input
|
|
21
|
-
* @param {...any} params Function params
|
|
22
|
-
*
|
|
23
|
-
* @returns {any}
|
|
24
|
-
*
|
|
25
|
-
* @name reduce
|
|
26
|
-
* @tag Array
|
|
27
|
-
* @signature (fn: Function, defaultAcc: mixed) => (input: Array): mixed
|
|
28
|
-
* @signature (fn: Function, defaultAcc: mixed, input: Array): mixed
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* const sum = (acc, item) => acc + item
|
|
32
|
-
*
|
|
33
|
-
* reduce(sum, 0, [1, 2])
|
|
34
|
-
* // => 3
|
|
35
|
-
*/ export var reduce = function() {
|
|
36
|
-
for(var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++){
|
|
37
|
-
params[_key] = arguments[_key];
|
|
38
|
-
}
|
|
39
|
-
// @signature (fn, defaultAcc) => (input)
|
|
40
|
-
if (params.length <= 2) {
|
|
41
|
-
return function(input) {
|
|
42
|
-
return _reduce(params[0], params[1], input);
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
// @signature (fn, defaultAcc, input)
|
|
46
|
-
return _reduce.apply(void 0, _to_consumable_array(params));
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=reduce.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/reduce/reduce.js"],"sourcesContent":["import { pipe } from \"../pipe/pipe.js\"\n\nconst _reduce = (_fn, defaultAcc, _input) => {\n let acc = defaultAcc\n const input = Array.isArray(_input) ? _input : [_input]\n const fn = Array.isArray(_fn) ? pipe(..._fn) : _fn\n\n for (let index = 0, length = input.length; index < length; index++) {\n acc = fn(acc, input[index], index, input)\n }\n\n return acc\n}\n\n/**\n * Apply a function against an accumulator and each element in the array (from\n * left to right) to reduce it to a single value.\n *\n * @param {Function} fn Reduce function\n * @param {Object} defaultAcc Default accumulator value\n * @param {Array} input Source input\n * @param {...any} params Function params\n *\n * @returns {any}\n *\n * @name reduce\n * @tag Array\n * @signature (fn: Function, defaultAcc: mixed) => (input: Array): mixed\n * @signature (fn: Function, defaultAcc: mixed, input: Array): mixed\n *\n * @example\n * const sum = (acc, item) => acc + item\n *\n * reduce(sum, 0, [1, 2])\n * // => 3\n */\nexport const reduce = (...params) => {\n // @signature (fn, defaultAcc) => (input)\n if (params.length <= 2) {\n return input => _reduce(params[0], params[1], input)\n }\n\n // @signature (fn, defaultAcc, input)\n return _reduce(...params)\n}\n"],"names":["pipe","_reduce","_fn","defaultAcc","_input","acc","input","Array","isArray","fn","index","length","reduce","params"],"mappings":"AAAA;AAAA,SAASA,IAAI,QAAQ,iBAAiB,CAAA;AAEtC,IAAMC,OAAO,GAAG,SAACC,GAAG,EAAEC,UAAU,EAAEC,MAAM,EAAK;IAC3C,IAAIC,GAAG,GAAGF,UAAU;IACpB,IAAMG,KAAK,GAAGC,KAAK,CAACC,OAAO,CAACJ,MAAM,CAAC,GAAGA,MAAM,GAAG;QAACA,MAAM;KAAC;IACvD,IAAMK,EAAE,GAAGF,KAAK,CAACC,OAAO,CAACN,GAAG,CAAC,GAAGF,IAAI,CAAJA,KAAY,CAAZA,KAAAA,CAAI,EAAC,qBAAGE,GAAG,CAAHA,CAAI,GAAGA,GAAG;IAElD,IAAK,IAAIQ,KAAK,GAAG,CAAC,EAAEC,MAAM,GAAGL,KAAK,CAACK,MAAM,EAAED,KAAK,GAAGC,MAAM,EAAED,KAAK,EAAE,CAAE;QAClEL,GAAG,GAAGI,EAAE,CAACJ,GAAG,EAAEC,KAAK,CAACI,KAAK,CAAC,EAAEA,KAAK,EAAEJ,KAAK,CAAC;IAC3C,CAAC;IAED,OAAOD,GAAG,CAAA;AACZ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;CAqBC,GACD,OAAO,IAAMO,MAAM,GAAG,WAAe;qCAAXC,MAAM;QAANA,MAAM;;IAC9B,yCAAyC;IACzC,IAAIA,MAAM,CAACF,MAAM,IAAI,CAAC,EAAE;QACtB,OAAOL,SAAAA,KAAK;mBAAIL,OAAO,CAACY,MAAM,CAAC,CAAC,CAAC,EAAEA,MAAM,CAAC,CAAC,CAAC,EAAEP,KAAK,CAAC;SAAA,CAAA;IACtD,CAAC;IAED,qCAAqC;IACrC,OAAOL,OAAO,CAAPA,KAAkB,CAAlBA,KAAAA,CAAO,EAAC,qBAAGY,MAAM,CAANA,CAAO,CAAA;AAC3B,CAAC,CAAA"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import _define_property from "@swc/helpers/src/_define_property.mjs";
|
|
2
|
-
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
3
|
-
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
4
|
-
import test from "tape";
|
|
5
|
-
import { reduce } from "./reduce.js";
|
|
6
|
-
test("reduce", function(t) {
|
|
7
|
-
t.equals(reduce(function(acc, item) {
|
|
8
|
-
return acc + item;
|
|
9
|
-
}, 0, [
|
|
10
|
-
1,
|
|
11
|
-
2,
|
|
12
|
-
3
|
|
13
|
-
]), 6, "Sum an array - uncurried");
|
|
14
|
-
t.equals(reduce(function(acc, next) {
|
|
15
|
-
return acc + next;
|
|
16
|
-
}, 0)([
|
|
17
|
-
1,
|
|
18
|
-
2,
|
|
19
|
-
3
|
|
20
|
-
]), 6, "Sum an array-curried");
|
|
21
|
-
t.equals(reduce(function(acc, next) {
|
|
22
|
-
return acc + next;
|
|
23
|
-
}, 0)(12), 12, "Run reduce for non-array input, treat as array of one");
|
|
24
|
-
t.equals(reduce(function() {
|
|
25
|
-
var acc = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, next = arguments.length > 1 ? arguments[1] : void 0;
|
|
26
|
-
return acc + next;
|
|
27
|
-
})([
|
|
28
|
-
1,
|
|
29
|
-
2,
|
|
30
|
-
3
|
|
31
|
-
]), 6, "Sum an array with the initial acc left undefined in the reduce function but set as default value in the param");
|
|
32
|
-
t.equals(reduce(function(acc, next) {
|
|
33
|
-
return acc + next;
|
|
34
|
-
}, 0)([]), 0, "Reducing empty array return default acc");
|
|
35
|
-
t.deepEquals(reduce(function(acc, next) {
|
|
36
|
-
return _object_spread_props(_object_spread({}, acc), _define_property({}, next, next));
|
|
37
|
-
}, {}, [
|
|
38
|
-
1,
|
|
39
|
-
2,
|
|
40
|
-
3
|
|
41
|
-
]), {
|
|
42
|
-
1: 1,
|
|
43
|
-
2: 2,
|
|
44
|
-
3: 3
|
|
45
|
-
}, "From array to object with default acc");
|
|
46
|
-
t.end();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=reduce.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/reduce/reduce.test.js"],"sourcesContent":["import test from \"tape\"\n\nimport { reduce } from \"./reduce.js\"\n\ntest(\"reduce\", t => {\n t.equals(\n reduce((acc, item) => acc + item, 0, [1, 2, 3]),\n 6,\n \"Sum an array - uncurried\"\n )\n\n t.equals(\n reduce((acc, next) => acc + next, 0)([1, 2, 3]),\n 6,\n \"Sum an array-curried\"\n )\n\n t.equals(\n reduce((acc, next) => acc + next, 0)(12),\n 12,\n \"Run reduce for non-array input, treat as array of one\"\n )\n\n t.equals(\n reduce((acc = 0, next) => acc + next)([1, 2, 3]),\n 6,\n \"Sum an array with the initial acc left undefined in the reduce function but set as default value in the param\"\n )\n\n t.equals(\n reduce((acc, next) => acc + next, 0)([]),\n 0,\n \"Reducing empty array return default acc\"\n )\n\n t.deepEquals(\n reduce((acc, next) => ({ ...acc, [next]: next }), {}, [1, 2, 3]),\n { 1: 1, 2: 2, 3: 3 },\n \"From array to object with default acc\"\n )\n\n t.end()\n})\n"],"names":["test","reduce","t","equals","acc","item","next","deepEquals","end"],"mappings":"AAAA;;;AAAA,OAAOA,IAAI,MAAM,MAAM,CAAA;AAEvB,SAASC,MAAM,QAAQ,aAAa,CAAA;AAEpCD,IAAI,CAAC,QAAQ,EAAEE,SAAAA,CAAC,EAAI;IAClBA,CAAC,CAACC,MAAM,CACNF,MAAM,CAAC,SAACG,GAAG,EAAEC,IAAI;eAAKD,GAAG,GAAGC,IAAI;KAAA,EAAE,CAAC,EAAE;AAAC,SAAC;AAAE,SAAC;AAAE,SAAC;KAAC,CAAC,EAC/C,CAAC,EACD,0BAA0B,CAC3B;IAEDH,CAAC,CAACC,MAAM,CACNF,MAAM,CAAC,SAACG,GAAG,EAAEE,IAAI;eAAKF,GAAG,GAAGE,IAAI;KAAA,EAAE,CAAC,CAAC,CAAC;AAAC,SAAC;AAAE,SAAC;AAAE,SAAC;KAAC,CAAC,EAC/C,CAAC,EACD,sBAAsB,CACvB;IAEDJ,CAAC,CAACC,MAAM,CACNF,MAAM,CAAC,SAACG,GAAG,EAAEE,IAAI;eAAKF,GAAG,GAAGE,IAAI;KAAA,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACxC,EAAE,EACF,uDAAuD,CACxD;IAEDJ,CAAC,CAACC,MAAM,CACNF,MAAM,CAAC;YAACG,GAAG,oEAAG,CAAC,EAAEE,IAAI;eAAKF,GAAG,GAAGE,IAAI;KAAA,CAAC,CAAC;AAAC,SAAC;AAAE,SAAC;AAAE,SAAC;KAAC,CAAC,EAChD,CAAC,EACD,+GAA+G,CAChH;IAEDJ,CAAC,CAACC,MAAM,CACNF,MAAM,CAAC,SAACG,GAAG,EAAEE,IAAI;eAAKF,GAAG,GAAGE,IAAI;KAAA,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACxC,CAAC,EACD,yCAAyC,CAC1C;IAEDJ,CAAC,CAACK,UAAU,CACVN,MAAM,CAAC,SAACG,GAAG,EAAEE,IAAI;eAAM,wCAAKF,GAAG,GAAE,qBAACE,IAAI,EAAGA,IAAI,CAAA,CAAE;KAAC,EAAE,EAAE,EAAE;AAAC,SAAC;AAAE,SAAC;AAAE,SAAC;KAAC,CAAC,EAChE;AAAE,QAAA,CAAC,EAAE,CAAC;AAAE,QAAA,CAAC,EAAE,CAAC;AAAE,QAAA,CAAC,EAAE,CAAC;KAAE,EACpB,uCAAuC,CACxC;IAEDJ,CAAC,CAACM,GAAG,EAAE;AACT,CAAC,CAAC"}
|
package/dist/remove/remove.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import _to_array from "@swc/helpers/src/_to_array.mjs";
|
|
2
|
-
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
|
|
3
|
-
import { pipe } from "../pipe/pipe.js";
|
|
4
|
-
import { isMatch } from "../is-match/is-match.js";
|
|
5
|
-
var _remove = function(_fn, input) {
|
|
6
|
-
var fn = Array.isArray(_fn) ? pipe.apply(void 0, _to_consumable_array(_fn)) : _fn;
|
|
7
|
-
var result = [];
|
|
8
|
-
var isPredicate = typeof fn === "function";
|
|
9
|
-
for(var i = 0, length = input.length; i < length; i++){
|
|
10
|
-
var shouldRemove = isPredicate ? fn(input[i]) === true : input[i] === fn;
|
|
11
|
-
if (!shouldRemove) {
|
|
12
|
-
result.push(input[i]);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return result;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Remove element(s) from array by value or by predicate
|
|
19
|
-
*
|
|
20
|
-
* @param {...any} params
|
|
21
|
-
* @param {Function|any} params.fn Value to remove or predicate to match
|
|
22
|
-
* @param {Array} params.input
|
|
23
|
-
*
|
|
24
|
-
* @returns {Array}
|
|
25
|
-
*
|
|
26
|
-
* @name remove
|
|
27
|
-
* @tag Array
|
|
28
|
-
* @signature (fn: Any) => (input: Array): Array
|
|
29
|
-
* @signature (fn: Any, input: Array): Array
|
|
30
|
-
* @example
|
|
31
|
-
* remove(3)([1, 2, 3])
|
|
32
|
-
* // => [1, 2]
|
|
33
|
-
*
|
|
34
|
-
* remove(_ => _ === 3)([1, 2, 3])
|
|
35
|
-
* // => [1, 2]
|
|
36
|
-
*/ export var remove = function() {
|
|
37
|
-
for(var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++){
|
|
38
|
-
params[_key] = arguments[_key];
|
|
39
|
-
}
|
|
40
|
-
// @signature (fn) => (input)
|
|
41
|
-
if (params.length <= 1) {
|
|
42
|
-
return function(input) {
|
|
43
|
-
return _remove(params[0], input);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
// @signature (fn, input)
|
|
47
|
-
return _remove.apply(void 0, _to_consumable_array(params));
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Remove element(s) by matching object
|
|
51
|
-
*
|
|
52
|
-
* @param {...any} params
|
|
53
|
-
* @param {Object} params.subset Match object
|
|
54
|
-
* @param {Array} params.input Source array
|
|
55
|
-
*
|
|
56
|
-
* @returns {Array}
|
|
57
|
-
*
|
|
58
|
-
* @name removeWith
|
|
59
|
-
* @tag Array
|
|
60
|
-
* @signature (subset: Object) => (input: Array): Array
|
|
61
|
-
* @signature (subset: Object, input: Array): Array
|
|
62
|
-
* @example
|
|
63
|
-
* removeWith(
|
|
64
|
-
* {
|
|
65
|
-
* tag: not(is)
|
|
66
|
-
* },
|
|
67
|
-
* [
|
|
68
|
-
* {id: 1, tag: 2},
|
|
69
|
-
* {id: 2}
|
|
70
|
-
* ]
|
|
71
|
-
* )
|
|
72
|
-
* // => [{id: 1, tag: 2}]
|
|
73
|
-
*/ export var removeWith = function() {
|
|
74
|
-
for(var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++){
|
|
75
|
-
params[_key] = arguments[_key];
|
|
76
|
-
}
|
|
77
|
-
var _params = _to_array(params), subset = _params[0], rest = _params.slice(1);
|
|
78
|
-
// @signature (subset) => (input)
|
|
79
|
-
if (params.length <= 1) {
|
|
80
|
-
return function(input) {
|
|
81
|
-
return _remove(isMatch(subset), input);
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
// @signature (subset, input)
|
|
85
|
-
return _remove.apply(void 0, [
|
|
86
|
-
isMatch(subset)
|
|
87
|
-
].concat(_to_consumable_array(rest)));
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
//# sourceMappingURL=remove.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/remove/remove.js"],"sourcesContent":["import { pipe } from \"../pipe/pipe.js\"\nimport { isMatch } from \"../is-match/is-match.js\"\n\nconst _remove = (_fn, input) => {\n const fn = Array.isArray(_fn) ? pipe(..._fn) : _fn\n const result = []\n const isPredicate = typeof fn === \"function\"\n\n for (let i = 0, length = input.length; i < length; i++) {\n const shouldRemove = isPredicate ? fn(input[i]) === true : input[i] === fn\n\n if (!shouldRemove) {\n result.push(input[i])\n }\n }\n\n return result\n}\n\n/**\n * Remove element(s) from array by value or by predicate\n *\n * @param {...any} params\n * @param {Function|any} params.fn Value to remove or predicate to match\n * @param {Array} params.input\n *\n * @returns {Array}\n *\n * @name remove\n * @tag Array\n * @signature (fn: Any) => (input: Array): Array\n * @signature (fn: Any, input: Array): Array\n * @example\n * remove(3)([1, 2, 3])\n * // => [1, 2]\n *\n * remove(_ => _ === 3)([1, 2, 3])\n * // => [1, 2]\n */\nexport const remove = (...params) => {\n // @signature (fn) => (input)\n if (params.length <= 1) {\n return input => _remove(params[0], input)\n }\n\n // @signature (fn, input)\n return _remove(...params)\n}\n\n/**\n * Remove element(s) by matching object\n *\n * @param {...any} params\n * @param {Object} params.subset Match object\n * @param {Array} params.input Source array\n *\n * @returns {Array}\n *\n * @name removeWith\n * @tag Array\n * @signature (subset: Object) => (input: Array): Array\n * @signature (subset: Object, input: Array): Array\n * @example\n * removeWith(\n * {\n * tag: not(is)\n * },\n * [\n * {id: 1, tag: 2},\n * {id: 2}\n * ]\n * )\n * // => [{id: 1, tag: 2}]\n */\nexport const removeWith = (...params) => {\n const [subset, ...rest] = params\n\n // @signature (subset) => (input)\n if (params.length <= 1) {\n return input => _remove(isMatch(subset), input)\n }\n\n // @signature (subset, input)\n return _remove(isMatch(subset), ...rest)\n}\n"],"names":["pipe","isMatch","_remove","_fn","input","fn","Array","isArray","result","isPredicate","i","length","shouldRemove","push","remove","params","removeWith","subset","rest"],"mappings":"AAAA;;AAAA,SAASA,IAAI,QAAQ,iBAAiB,CAAA;AACtC,SAASC,OAAO,QAAQ,yBAAyB,CAAA;AAEjD,IAAMC,OAAO,GAAG,SAACC,GAAG,EAAEC,KAAK,EAAK;IAC9B,IAAMC,EAAE,GAAGC,KAAK,CAACC,OAAO,CAACJ,GAAG,CAAC,GAAGH,IAAI,CAAJA,KAAY,CAAZA,KAAAA,CAAI,EAAC,qBAAGG,GAAG,CAAHA,CAAI,GAAGA,GAAG;IAClD,IAAMK,MAAM,GAAG,EAAE;IACjB,IAAMC,WAAW,GAAG,OAAOJ,EAAE,KAAK,UAAU;IAE5C,IAAK,IAAIK,CAAC,GAAG,CAAC,EAAEC,MAAM,GAAGP,KAAK,CAACO,MAAM,EAAED,CAAC,GAAGC,MAAM,EAAED,CAAC,EAAE,CAAE;QACtD,IAAME,YAAY,GAAGH,WAAW,GAAGJ,EAAE,CAACD,KAAK,CAACM,CAAC,CAAC,CAAC,KAAK,IAAI,GAAGN,KAAK,CAACM,CAAC,CAAC,KAAKL,EAAE;QAE1E,IAAI,CAACO,YAAY,EAAE;YACjBJ,MAAM,CAACK,IAAI,CAACT,KAAK,CAACM,CAAC,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAOF,MAAM,CAAA;AACf,CAAC;AAED;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,IAAMM,MAAM,GAAG,WAAe;qCAAXC,MAAM;QAANA,MAAM;;IAC9B,6BAA6B;IAC7B,IAAIA,MAAM,CAACJ,MAAM,IAAI,CAAC,EAAE;QACtB,OAAOP,SAAAA,KAAK;mBAAIF,OAAO,CAACa,MAAM,CAAC,CAAC,CAAC,EAAEX,KAAK,CAAC;SAAA,CAAA;IAC3C,CAAC;IAED,yBAAyB;IACzB,OAAOF,OAAO,CAAPA,KAAkB,CAAlBA,KAAAA,CAAO,EAAC,qBAAGa,MAAM,CAANA,CAAO,CAAA;AAC3B,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;CAwBC,GACD,OAAO,IAAMC,UAAU,GAAG,WAAe;qCAAXD,MAAM;QAANA,MAAM;;IAClC,IAA0BA,OAAM,aAANA,MAAM,CAAA,EAAzBE,MAAM,GAAaF,OAAM,GAAnB,EAAE,AAAGG,IAAI,GAAIH,OAAM,OAAjB,CAAGG,CAAAA,AAAc;IAEhC,iCAAiC;IACjC,IAAIH,MAAM,CAACJ,MAAM,IAAI,CAAC,EAAE;QACtB,OAAOP,SAAAA,KAAK;mBAAIF,OAAO,CAACD,OAAO,CAACgB,MAAM,CAAC,EAAEb,KAAK,CAAC;SAAA,CAAA;IACjD,CAAC;IAED,6BAA6B;IAC7B,OAAOF,OAAO,CAAPA,KAAiC,CAAjCA,KAAAA,CAAO,EAAPA;QAAQD,OAAO,CAACgB,MAAM,CAAC;KAAU,CAAjCf,MAAiC,CAAR,qBAAGgB,IAAI,CAAJA,CAAK,CAAA,CAAA;AAC1C,CAAC,CAAA"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/* eslint-disable unicorn/no-null */ import test from "tape";
|
|
2
|
-
import { isEmpty } from "../is-empty/is-empty.js";
|
|
3
|
-
import { read } from "../read/read.js";
|
|
4
|
-
import { remove, removeWith } from "./remove.js";
|
|
5
|
-
test("remove", function(t) {
|
|
6
|
-
t.deepEqual(remove(isEmpty, []), [], "Remove elements from empty array should return empty array");
|
|
7
|
-
t.deepEqual(remove(function(_) {
|
|
8
|
-
return _ === 3;
|
|
9
|
-
})([
|
|
10
|
-
1,
|
|
11
|
-
2,
|
|
12
|
-
3
|
|
13
|
-
]), [
|
|
14
|
-
1,
|
|
15
|
-
2
|
|
16
|
-
], "Remove existing element from array by match function");
|
|
17
|
-
t.deepEqual(remove(3, [
|
|
18
|
-
1,
|
|
19
|
-
2,
|
|
20
|
-
3
|
|
21
|
-
]), [
|
|
22
|
-
1,
|
|
23
|
-
2
|
|
24
|
-
], "Remove existing element from array by value");
|
|
25
|
-
t.deepEqual(remove([
|
|
26
|
-
read("comments"),
|
|
27
|
-
isEmpty
|
|
28
|
-
], [
|
|
29
|
-
{
|
|
30
|
-
id: 1
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
id: 2,
|
|
34
|
-
comments: [
|
|
35
|
-
{
|
|
36
|
-
id: 1
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
]), [
|
|
41
|
-
{
|
|
42
|
-
id: 2,
|
|
43
|
-
comments: [
|
|
44
|
-
{
|
|
45
|
-
id: 1
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
], "Remove existing element from array of objects using predicate pipeline");
|
|
50
|
-
t.end();
|
|
51
|
-
});
|
|
52
|
-
test("removeWith", function(t) {
|
|
53
|
-
t.deepEqual(removeWith({
|
|
54
|
-
author: null
|
|
55
|
-
})([
|
|
56
|
-
{
|
|
57
|
-
id: 1,
|
|
58
|
-
author: null
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: 2,
|
|
62
|
-
author: null
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: 3,
|
|
66
|
-
author: 3
|
|
67
|
-
},
|
|
68
|
-
]), [
|
|
69
|
-
{
|
|
70
|
-
id: 3,
|
|
71
|
-
author: 3
|
|
72
|
-
}
|
|
73
|
-
], "Remove multiple elements from array by matching a subset (curried)");
|
|
74
|
-
t.deepEqual(removeWith({
|
|
75
|
-
author: null
|
|
76
|
-
}, [
|
|
77
|
-
{
|
|
78
|
-
id: 1,
|
|
79
|
-
author: null
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: 2,
|
|
83
|
-
author: null
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: 3,
|
|
87
|
-
author: 3
|
|
88
|
-
},
|
|
89
|
-
]), [
|
|
90
|
-
{
|
|
91
|
-
id: 3,
|
|
92
|
-
author: 3
|
|
93
|
-
}
|
|
94
|
-
], "Remove multiple elements from array by matching a subset (uncurried)");
|
|
95
|
-
t.end();
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
//# sourceMappingURL=remove.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/remove/remove.test.js"],"sourcesContent":["/* eslint-disable unicorn/no-null */\n\nimport test from \"tape\"\n\nimport { isEmpty } from \"../is-empty/is-empty.js\"\nimport { read } from \"../read/read.js\"\nimport { remove, removeWith } from \"./remove.js\"\n\ntest(\"remove\", t => {\n t.deepEqual(\n remove(isEmpty, []),\n [],\n \"Remove elements from empty array should return empty array\"\n )\n\n t.deepEqual(\n remove(_ => _ === 3)([1, 2, 3]),\n [1, 2],\n \"Remove existing element from array by match function\"\n )\n\n t.deepEqual(\n remove(3, [1, 2, 3]),\n [1, 2],\n \"Remove existing element from array by value\"\n )\n\n t.deepEqual(\n remove(\n [read(\"comments\"), isEmpty],\n [{ id: 1 }, { id: 2, comments: [{ id: 1 }] }]\n ),\n [{ id: 2, comments: [{ id: 1 }] }],\n \"Remove existing element from array of objects using predicate pipeline\"\n )\n\n t.end()\n})\n\ntest(\"removeWith\", t => {\n t.deepEqual(\n removeWith({ author: null })([\n { id: 1, author: null },\n { id: 2, author: null },\n { id: 3, author: 3 },\n ]),\n [{ id: 3, author: 3 }],\n \"Remove multiple elements from array by matching a subset (curried)\"\n )\n\n t.deepEqual(\n removeWith({ author: null }, [\n { id: 1, author: null },\n { id: 2, author: null },\n { id: 3, author: 3 },\n ]),\n [{ id: 3, author: 3 }],\n \"Remove multiple elements from array by matching a subset (uncurried)\"\n )\n\n t.end()\n})\n"],"names":["test","isEmpty","read","remove","removeWith","t","deepEqual","_","id","comments","end","author"],"mappings":"AAAA,kCAAkC,GAElC,OAAOA,IAAI,MAAM,MAAM,CAAA;AAEvB,SAASC,OAAO,QAAQ,yBAAyB,CAAA;AACjD,SAASC,IAAI,QAAQ,iBAAiB,CAAA;AACtC,SAASC,MAAM,EAAEC,UAAU,QAAQ,aAAa,CAAA;AAEhDJ,IAAI,CAAC,QAAQ,EAAEK,SAAAA,CAAC,EAAI;IAClBA,CAAC,CAACC,SAAS,CACTH,MAAM,CAACF,OAAO,EAAE,EAAE,CAAC,EACnB,EAAE,EACF,4DAA4D,CAC7D;IAEDI,CAAC,CAACC,SAAS,CACTH,MAAM,CAACI,SAAAA,CAAC;eAAIA,CAAC,KAAK,CAAC;KAAA,CAAC,CAAC;AAAC,SAAC;AAAE,SAAC;AAAE,SAAC;KAAC,CAAC,EAC/B;AAAC,SAAC;AAAE,SAAC;KAAC,EACN,sDAAsD,CACvD;IAEDF,CAAC,CAACC,SAAS,CACTH,MAAM,CAAC,CAAC,EAAE;AAAC,SAAC;AAAE,SAAC;AAAE,SAAC;KAAC,CAAC,EACpB;AAAC,SAAC;AAAE,SAAC;KAAC,EACN,6CAA6C,CAC9C;IAEDE,CAAC,CAACC,SAAS,CACTH,MAAM,CACJ;QAACD,IAAI,CAAC,UAAU,CAAC;QAAED,OAAO;KAAC,EAC3B;QAAC;YAAEO,EAAE,EAAE,CAAC;SAAE;QAAE;YAAEA,EAAE,EAAE,CAAC;YAAEC,QAAQ,EAAE;gBAAC;oBAAED,EAAE,EAAE,CAAC;iBAAE;aAAC;SAAE;KAAC,CAC9C,EACD;QAAC;YAAEA,EAAE,EAAE,CAAC;YAAEC,QAAQ,EAAE;gBAAC;oBAAED,EAAE,EAAE,CAAC;iBAAE;aAAC;SAAE;KAAC,EAClC,wEAAwE,CACzE;IAEDH,CAAC,CAACK,GAAG,EAAE;AACT,CAAC,CAAC;AAEFV,IAAI,CAAC,YAAY,EAAEK,SAAAA,CAAC,EAAI;IACtBA,CAAC,CAACC,SAAS,CACTF,UAAU,CAAC;QAAEO,MAAM,EAAE,IAAI;KAAE,CAAC,CAAC;QAC3B;YAAEH,EAAE,EAAE,CAAC;YAAEG,MAAM,EAAE,IAAI;SAAE;QACvB;YAAEH,EAAE,EAAE,CAAC;YAAEG,MAAM,EAAE,IAAI;SAAE;QACvB;YAAEH,EAAE,EAAE,CAAC;YAAEG,MAAM,EAAE,CAAC;SAAE;KACrB,CAAC,EACF;QAAC;YAAEH,EAAE,EAAE,CAAC;YAAEG,MAAM,EAAE,CAAC;SAAE;KAAC,EACtB,oEAAoE,CACrE;IAEDN,CAAC,CAACC,SAAS,CACTF,UAAU,CAAC;QAAEO,MAAM,EAAE,IAAI;KAAE,EAAE;QAC3B;YAAEH,EAAE,EAAE,CAAC;YAAEG,MAAM,EAAE,IAAI;SAAE;QACvB;YAAEH,EAAE,EAAE,CAAC;YAAEG,MAAM,EAAE,IAAI;SAAE;QACvB;YAAEH,EAAE,EAAE,CAAC;YAAEG,MAAM,EAAE,CAAC;SAAE;KACrB,CAAC,EACF;QAAC;YAAEH,EAAE,EAAE,CAAC;YAAEG,MAAM,EAAE,CAAC;SAAE;KAAC,EACtB,sEAAsE,CACvE;IAEDN,CAAC,CAACK,GAAG,EAAE;AACT,CAAC,CAAC"}
|
package/dist/rename/rename.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
-
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
|
|
3
|
-
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
|
|
4
|
-
import { map } from "../map/map.js";
|
|
5
|
-
/**
|
|
6
|
-
* @param {Object} mappings
|
|
7
|
-
* @param {Object} input
|
|
8
|
-
*
|
|
9
|
-
* @returns {Object}
|
|
10
|
-
*/ var _renameOne = function(mappings, input) {
|
|
11
|
-
var entries = Object.entries(mappings);
|
|
12
|
-
var result = _object_spread({}, input);
|
|
13
|
-
for(var i = 0, length = entries.length; i < length; ++i){
|
|
14
|
-
var _i = _sliced_to_array(entries[i], 2), oldKey = _i[0], newKey = _i[1];
|
|
15
|
-
if (result.hasOwnProperty(oldKey)) {
|
|
16
|
-
result[newKey] = result[oldKey];
|
|
17
|
-
delete result[oldKey];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @param {Object} mappings
|
|
24
|
-
* @param {Object | Object[]} input
|
|
25
|
-
*
|
|
26
|
-
* @returns {Object | Object[]}
|
|
27
|
-
*/ var _renameMany = function(mappings, input) {
|
|
28
|
-
return map(function(item) {
|
|
29
|
-
return _renameOne(mappings, item);
|
|
30
|
-
}, input);
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Rename keys inside an object
|
|
34
|
-
*
|
|
35
|
-
* @param {...any} params
|
|
36
|
-
*
|
|
37
|
-
* @returns {Object | Object[]}
|
|
38
|
-
*
|
|
39
|
-
* @name renameKeys
|
|
40
|
-
* @tag Object
|
|
41
|
-
* @signature (mappings: object) => (input: object) => object
|
|
42
|
-
* @signature (mappings: object, input: object) => object
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* rename({ old: "new" }, { old: 42 })
|
|
46
|
-
* // => { new: 42 }
|
|
47
|
-
*
|
|
48
|
-
* rename({ old: "new" }, [{ old: 42 }, { old: 41 }])
|
|
49
|
-
* // => [{ new: 42 }, { new: 41 }]
|
|
50
|
-
*/ export var rename = function() {
|
|
51
|
-
for(var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++){
|
|
52
|
-
params[_key] = arguments[_key];
|
|
53
|
-
}
|
|
54
|
-
// @signature (mappings) => (input)
|
|
55
|
-
if (params.length <= 1) {
|
|
56
|
-
return function(input) {
|
|
57
|
-
return _renameOne(params[0], input);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
// @signature (mappings, input)
|
|
61
|
-
return _renameOne.apply(void 0, _to_consumable_array(params));
|
|
62
|
-
};
|
|
63
|
-
export var renameMany = function() {
|
|
64
|
-
for(var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++){
|
|
65
|
-
params[_key] = arguments[_key];
|
|
66
|
-
}
|
|
67
|
-
// @signature (mappings) => (input)
|
|
68
|
-
if (params.length <= 1) {
|
|
69
|
-
return function(input) {
|
|
70
|
-
return _renameMany(params[0], input);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
// @signature (mappings, input)
|
|
74
|
-
return _renameMany.apply(void 0, _to_consumable_array(params));
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
//# sourceMappingURL=rename.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/rename/rename.js"],"sourcesContent":["import { map } from \"../map/map.js\"\n\n/**\n * @param {Object} mappings\n * @param {Object} input\n *\n * @returns {Object}\n */\nconst _renameOne = (mappings, input) => {\n const entries = Object.entries(mappings)\n const result = { ...input }\n\n for (let i = 0, length = entries.length; i < length; ++i) {\n const [oldKey, newKey] = entries[i]\n\n if (result.hasOwnProperty(oldKey)) {\n result[newKey] = result[oldKey]\n delete result[oldKey]\n }\n }\n\n return result\n}\n\n/**\n * @param {Object} mappings\n * @param {Object | Object[]} input\n *\n * @returns {Object | Object[]}\n */\nconst _renameMany = (mappings, input) =>\n map(item => _renameOne(mappings, item), input)\n\n/**\n * Rename keys inside an object\n *\n * @param {...any} params\n *\n * @returns {Object | Object[]}\n *\n * @name renameKeys\n * @tag Object\n * @signature (mappings: object) => (input: object) => object\n * @signature (mappings: object, input: object) => object\n *\n * @example\n * rename({ old: \"new\" }, { old: 42 })\n * // => { new: 42 }\n *\n * rename({ old: \"new\" }, [{ old: 42 }, { old: 41 }])\n * // => [{ new: 42 }, { new: 41 }]\n */\nexport const rename = (...params) => {\n // @signature (mappings) => (input)\n if (params.length <= 1) {\n return input => _renameOne(params[0], input)\n }\n\n // @signature (mappings, input)\n return _renameOne(...params)\n}\n\nexport const renameMany = (...params) => {\n // @signature (mappings) => (input)\n if (params.length <= 1) {\n return input => _renameMany(params[0], input)\n }\n\n // @signature (mappings, input)\n return _renameMany(...params)\n}\n"],"names":["map","_renameOne","mappings","input","entries","Object","result","i","length","oldKey","newKey","hasOwnProperty","_renameMany","item","rename","params","renameMany"],"mappings":"AAAA;;;AAAA,SAASA,GAAG,QAAQ,eAAe,CAAA;AAEnC;;;;;CAKC,GACD,IAAMC,UAAU,GAAG,SAACC,QAAQ,EAAEC,KAAK,EAAK;IACtC,IAAMC,OAAO,GAAGC,MAAM,CAACD,OAAO,CAACF,QAAQ,CAAC;IACxC,IAAMI,MAAM,GAAG,mBAAKH,KAAK,CAAE;IAE3B,IAAK,IAAII,CAAC,GAAG,CAAC,EAAEC,MAAM,GAAGJ,OAAO,CAACI,MAAM,EAAED,CAAC,GAAGC,MAAM,EAAE,EAAED,CAAC,CAAE;QACxD,IAAyBH,EAAU,oBAAVA,OAAO,CAACG,CAAC,CAAC,IAAA,EAA5BE,MAAM,GAAYL,EAAU,GAAtB,EAAEM,MAAM,GAAIN,EAAU,GAAd,AAAc;QAEnC,IAAIE,MAAM,CAACK,cAAc,CAACF,MAAM,CAAC,EAAE;YACjCH,MAAM,CAACI,MAAM,CAAC,GAAGJ,MAAM,CAACG,MAAM,CAAC;YAC/B,OAAOH,MAAM,CAACG,MAAM,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAOH,MAAM,CAAA;AACf,CAAC;AAED;;;;;CAKC,GACD,IAAMM,WAAW,GAAG,SAACV,QAAQ,EAAEC,KAAK;WAClCH,GAAG,CAACa,SAAAA,IAAI;eAAIZ,UAAU,CAACC,QAAQ,EAAEW,IAAI,CAAC;KAAA,EAAEV,KAAK,CAAC;CAAA;AAEhD;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,IAAMW,MAAM,GAAG,WAAe;qCAAXC,MAAM;QAANA,MAAM;;IAC9B,mCAAmC;IACnC,IAAIA,MAAM,CAACP,MAAM,IAAI,CAAC,EAAE;QACtB,OAAOL,SAAAA,KAAK;mBAAIF,UAAU,CAACc,MAAM,CAAC,CAAC,CAAC,EAAEZ,KAAK,CAAC;SAAA,CAAA;IAC9C,CAAC;IAED,+BAA+B;IAC/B,OAAOF,UAAU,CAAVA,KAAqB,CAArBA,KAAAA,CAAU,EAAC,qBAAGc,MAAM,CAANA,CAAO,CAAA;AAC9B,CAAC,CAAA;AAED,OAAO,IAAMC,UAAU,GAAG,WAAe;qCAAXD,MAAM;QAANA,MAAM;;IAClC,mCAAmC;IACnC,IAAIA,MAAM,CAACP,MAAM,IAAI,CAAC,EAAE;QACtB,OAAOL,SAAAA,KAAK;mBAAIS,WAAW,CAACG,MAAM,CAAC,CAAC,CAAC,EAAEZ,KAAK,CAAC;SAAA,CAAA;IAC/C,CAAC;IAED,+BAA+B;IAC/B,OAAOS,WAAW,CAAXA,KAAsB,CAAtBA,KAAAA,CAAW,EAAC,qBAAGG,MAAM,CAANA,CAAO,CAAA;AAC/B,CAAC,CAAA"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/* eslint-disable new-cap */ import test from "tape";
|
|
2
|
-
import { rename, renameMany } from "./rename.js";
|
|
3
|
-
test("rename", function(t) {
|
|
4
|
-
t.deepEqual(rename({
|
|
5
|
-
test: "changed"
|
|
6
|
-
}, {
|
|
7
|
-
test: "Lorem Ipsum"
|
|
8
|
-
}), {
|
|
9
|
-
changed: "Lorem Ipsum"
|
|
10
|
-
}, "given [object] renaming an existing property should [return new object with renamed property]");
|
|
11
|
-
t.deepEqual(rename({
|
|
12
|
-
notExist: "test"
|
|
13
|
-
})({
|
|
14
|
-
test: "Lorem Ipsum"
|
|
15
|
-
}), {
|
|
16
|
-
test: "Lorem Ipsum"
|
|
17
|
-
}, "given [object] renaming an non-existing property should [return new object with same properties]");
|
|
18
|
-
t.deepEqual(rename({
|
|
19
|
-
foo: "lorem"
|
|
20
|
-
}, {
|
|
21
|
-
foo: "bar",
|
|
22
|
-
lorem: "ipsum"
|
|
23
|
-
}), {
|
|
24
|
-
lorem: "bar"
|
|
25
|
-
}, "given [object] renaming an existing property to another existing property should [return new object with renamed property]");
|
|
26
|
-
t.end();
|
|
27
|
-
});
|
|
28
|
-
test("renameMany", function(t) {
|
|
29
|
-
t.deepEqual(renameMany({
|
|
30
|
-
test: "changed"
|
|
31
|
-
}, [
|
|
32
|
-
{
|
|
33
|
-
test: "Lorem Ipsum"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
cant: "touch this"
|
|
37
|
-
},
|
|
38
|
-
]), [
|
|
39
|
-
{
|
|
40
|
-
changed: "Lorem Ipsum"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
cant: "touch this"
|
|
44
|
-
}
|
|
45
|
-
], "given [array of objects] renaming an existing property should [return new array of objects with renamed properties]");
|
|
46
|
-
t.end();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=rename.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/rename/rename.test.js"],"sourcesContent":["/* eslint-disable new-cap */\n\nimport test from \"tape\"\n\nimport { rename, renameMany } from \"./rename.js\"\n\ntest(\"rename\", t => {\n t.deepEqual(\n rename({ test: \"changed\" }, { test: \"Lorem Ipsum\" }),\n { changed: \"Lorem Ipsum\" },\n \"given [object] renaming an existing property should [return new object with renamed property]\"\n )\n\n t.deepEqual(\n rename({ notExist: \"test\" })({ test: \"Lorem Ipsum\" }),\n { test: \"Lorem Ipsum\" },\n \"given [object] renaming an non-existing property should [return new object with same properties]\"\n )\n\n t.deepEqual(\n rename({ foo: \"lorem\" }, { foo: \"bar\", lorem: \"ipsum\" }),\n { lorem: \"bar\" },\n \"given [object] renaming an existing property to another existing property should [return new object with renamed property]\"\n )\n\n t.end()\n})\n\ntest(\"renameMany\", t => {\n t.deepEqual(\n renameMany({ test: \"changed\" }, [\n { test: \"Lorem Ipsum\" },\n { cant: \"touch this\" },\n ]),\n [{ changed: \"Lorem Ipsum\" }, { cant: \"touch this\" }],\n \"given [array of objects] renaming an existing property should [return new array of objects with renamed properties]\"\n )\n\n t.end()\n})\n"],"names":["test","rename","renameMany","t","deepEqual","changed","notExist","foo","lorem","end","cant"],"mappings":"AAAA,0BAA0B,GAE1B,OAAOA,IAAI,MAAM,MAAM,CAAA;AAEvB,SAASC,MAAM,EAAEC,UAAU,QAAQ,aAAa,CAAA;AAEhDF,IAAI,CAAC,QAAQ,EAAEG,SAAAA,CAAC,EAAI;IAClBA,CAAC,CAACC,SAAS,CACTH,MAAM,CAAC;QAAED,IAAI,EAAE,SAAS;KAAE,EAAE;QAAEA,IAAI,EAAE,aAAa;KAAE,CAAC,EACpD;QAAEK,OAAO,EAAE,aAAa;KAAE,EAC1B,+FAA+F,CAChG;IAEDF,CAAC,CAACC,SAAS,CACTH,MAAM,CAAC;QAAEK,QAAQ,EAAE,MAAM;KAAE,CAAC,CAAC;QAAEN,IAAI,EAAE,aAAa;KAAE,CAAC,EACrD;QAAEA,IAAI,EAAE,aAAa;KAAE,EACvB,kGAAkG,CACnG;IAEDG,CAAC,CAACC,SAAS,CACTH,MAAM,CAAC;QAAEM,GAAG,EAAE,OAAO;KAAE,EAAE;QAAEA,GAAG,EAAE,KAAK;QAAEC,KAAK,EAAE,OAAO;KAAE,CAAC,EACxD;QAAEA,KAAK,EAAE,KAAK;KAAE,EAChB,4HAA4H,CAC7H;IAEDL,CAAC,CAACM,GAAG,EAAE;AACT,CAAC,CAAC;AAEFT,IAAI,CAAC,YAAY,EAAEG,SAAAA,CAAC,EAAI;IACtBA,CAAC,CAACC,SAAS,CACTF,UAAU,CAAC;QAAEF,IAAI,EAAE,SAAS;KAAE,EAAE;QAC9B;YAAEA,IAAI,EAAE,aAAa;SAAE;QACvB;YAAEU,IAAI,EAAE,YAAY;SAAE;KACvB,CAAC,EACF;QAAC;YAAEL,OAAO,EAAE,aAAa;SAAE;QAAE;YAAEK,IAAI,EAAE,YAAY;SAAE;KAAC,EACpD,qHAAqH,CACtH;IAEDP,CAAC,CAACM,GAAG,EAAE;AACT,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* eslint-disable unicorn/prefer-node-protocol */ import path from "path";
|
|
2
|
-
import { pipe } from "../pipe/pipe.js";
|
|
3
|
-
import { trim } from "../trim/trim.js";
|
|
4
|
-
import { split } from "../split/split.js";
|
|
5
|
-
import { push } from "../push/push.js";
|
|
6
|
-
import { unite } from "../unite/unite.js";
|
|
7
|
-
import { dropLast } from "../drop-last/drop-last.js";
|
|
8
|
-
var removeTrailingSlash = function(input) {
|
|
9
|
-
return input[input.length - 1] === path.sep ? input.slice(0, -1) : input;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Rename a file
|
|
13
|
-
*
|
|
14
|
-
* @param {string} newName New file name
|
|
15
|
-
* @param {string} input Absolute file path
|
|
16
|
-
*
|
|
17
|
-
* @returns {string}
|
|
18
|
-
*/ var renameFile = function(newName) {
|
|
19
|
-
return pipe(removeTrailingSlash, split(path.sep), dropLast, push(trim(path.sep)(newName)), unite(path.sep));
|
|
20
|
-
};
|
|
21
|
-
export { renameFile };
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=rename-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/rename-file/rename-file.js"],"sourcesContent":["/* eslint-disable unicorn/prefer-node-protocol */\n\nimport path from \"path\"\n\nimport { pipe } from \"../pipe/pipe.js\"\nimport { trim } from \"../trim/trim.js\"\nimport { split } from \"../split/split.js\"\nimport { push } from \"../push/push.js\"\nimport { unite } from \"../unite/unite.js\"\nimport { dropLast } from \"../drop-last/drop-last.js\"\n\nconst removeTrailingSlash = input =>\n input[input.length - 1] === path.sep ? input.slice(0, -1) : input\n\n/**\n * Rename a file\n *\n * @param {string} newName New file name\n * @param {string} input Absolute file path\n *\n * @returns {string}\n */\nconst renameFile = newName =>\n pipe(\n removeTrailingSlash,\n split(path.sep),\n dropLast,\n push(trim(path.sep)(newName)),\n unite(path.sep)\n )\n\nexport { renameFile }\n"],"names":["path","pipe","trim","split","push","unite","dropLast","removeTrailingSlash","input","length","sep","slice","renameFile","newName"],"mappings":"AAAA,+CAA+C,GAE/C,OAAOA,IAAI,MAAM,MAAM,CAAA;AAEvB,SAASC,IAAI,QAAQ,iBAAiB,CAAA;AACtC,SAASC,IAAI,QAAQ,iBAAiB,CAAA;AACtC,SAASC,KAAK,QAAQ,mBAAmB,CAAA;AACzC,SAASC,IAAI,QAAQ,iBAAiB,CAAA;AACtC,SAASC,KAAK,QAAQ,mBAAmB,CAAA;AACzC,SAASC,QAAQ,QAAQ,2BAA2B,CAAA;AAEpD,IAAMC,mBAAmB,GAAGC,SAAAA,KAAK;WAC/BA,KAAK,CAACA,KAAK,CAACC,MAAM,GAAG,CAAC,CAAC,KAAKT,IAAI,CAACU,GAAG,GAAGF,KAAK,CAACG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAGH,KAAK;CAAA;AAEnE;;;;;;;CAOC,GACD,IAAMI,UAAU,GAAGC,SAAAA,OAAO;WACxBZ,IAAI,CACFM,mBAAmB,EACnBJ,KAAK,CAACH,IAAI,CAACU,GAAG,CAAC,EACfJ,QAAQ,EACRF,IAAI,CAACF,IAAI,CAACF,IAAI,CAACU,GAAG,CAAC,CAACG,OAAO,CAAC,CAAC,EAC7BR,KAAK,CAACL,IAAI,CAACU,GAAG,CAAC,CAChB;CAAA;AAEH,SAASE,UAAU,GAAE"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import test from "tape";
|
|
2
|
-
import { renameFile } from "./rename-file.js";
|
|
3
|
-
test("renameFile", function(t) {
|
|
4
|
-
t.equals(renameFile("ipsum")("/home/user/lorem"), "/home/user/ipsum", "Rename file with full path");
|
|
5
|
-
t.equals(renameFile("ipsum")("/home/user/lorem/"), "/home/user/ipsum", "Rename file with trailing slash in path");
|
|
6
|
-
t.equals(renameFile("ipsum/")("/home/user/lorem/"), "/home/user/ipsum", "Rename file with trailing slash in path and new file name");
|
|
7
|
-
t.equals(renameFile("/ipsum")("/home/user/lorem"), "/home/user/ipsum", "Rename file with trailing slash in new file name");
|
|
8
|
-
t.equals(renameFile("ipsum")("lorem"), "ipsum", "Rename file with only fileName");
|
|
9
|
-
t.equals(renameFile("ipsum")(renameFile("ipsum")("/lorem/test")), "/lorem/ipsum", "Idempotent");
|
|
10
|
-
t.end();
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=rename-file.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/rename-file/rename-file.test.js"],"sourcesContent":["import test from \"tape\"\n\nimport { renameFile } from \"./rename-file.js\"\n\ntest(\"renameFile\", t => {\n t.equals(\n renameFile(\"ipsum\")(\"/home/user/lorem\"),\n \"/home/user/ipsum\",\n \"Rename file with full path\"\n )\n\n t.equals(\n renameFile(\"ipsum\")(\"/home/user/lorem/\"),\n \"/home/user/ipsum\",\n \"Rename file with trailing slash in path\"\n )\n\n t.equals(\n renameFile(\"ipsum/\")(\"/home/user/lorem/\"),\n \"/home/user/ipsum\",\n \"Rename file with trailing slash in path and new file name\"\n )\n\n t.equals(\n renameFile(\"/ipsum\")(\"/home/user/lorem\"),\n \"/home/user/ipsum\",\n \"Rename file with trailing slash in new file name\"\n )\n\n t.equals(\n renameFile(\"ipsum\")(\"lorem\"),\n \"ipsum\",\n \"Rename file with only fileName\"\n )\n\n t.equals(\n renameFile(\"ipsum\")(renameFile(\"ipsum\")(\"/lorem/test\")),\n \"/lorem/ipsum\",\n \"Idempotent\"\n )\n t.end()\n})\n"],"names":["test","renameFile","t","equals","end"],"mappings":"AAAA,OAAOA,IAAI,MAAM,MAAM,CAAA;AAEvB,SAASC,UAAU,QAAQ,kBAAkB,CAAA;AAE7CD,IAAI,CAAC,YAAY,EAAEE,SAAAA,CAAC,EAAI;IACtBA,CAAC,CAACC,MAAM,CACNF,UAAU,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,EACvC,kBAAkB,EAClB,4BAA4B,CAC7B;IAEDC,CAAC,CAACC,MAAM,CACNF,UAAU,CAAC,OAAO,CAAC,CAAC,mBAAmB,CAAC,EACxC,kBAAkB,EAClB,yCAAyC,CAC1C;IAEDC,CAAC,CAACC,MAAM,CACNF,UAAU,CAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EACzC,kBAAkB,EAClB,2DAA2D,CAC5D;IAEDC,CAAC,CAACC,MAAM,CACNF,UAAU,CAAC,QAAQ,CAAC,CAAC,kBAAkB,CAAC,EACxC,kBAAkB,EAClB,kDAAkD,CACnD;IAEDC,CAAC,CAACC,MAAM,CACNF,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAC5B,OAAO,EACP,gCAAgC,CACjC;IAEDC,CAAC,CAACC,MAAM,CACNF,UAAU,CAAC,OAAO,CAAC,CAACA,UAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,EACvD,cAAc,EACd,YAAY,CACb;IACDC,CAAC,CAACE,GAAG,EAAE;AACT,CAAC,CAAC"}
|
package/dist/repeat/repeat.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
|
|
2
|
-
import { pipe } from "../pipe/pipe.js";
|
|
3
|
-
var _repeat = function(_fn) {
|
|
4
|
-
var count = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
5
|
-
var result = [];
|
|
6
|
-
var fn = Array.isArray(_fn) ? pipe.apply(void 0, _to_consumable_array(_fn)) : _fn;
|
|
7
|
-
var isFunction = typeof fn === "function";
|
|
8
|
-
for(var i = 0; i < count; i++){
|
|
9
|
-
result.push(isFunction ? fn(i, result) : fn);
|
|
10
|
-
}
|
|
11
|
-
return result;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Return an array of fixed size containing a specified value or function result
|
|
15
|
-
*
|
|
16
|
-
* @param {Function|any} fn Function or value to repeat
|
|
17
|
-
* @param {number} input Number of times
|
|
18
|
-
* @param {...any} params Function params
|
|
19
|
-
*
|
|
20
|
-
* @returns {Array}
|
|
21
|
-
*
|
|
22
|
-
* @name repeat
|
|
23
|
-
* @tag Array
|
|
24
|
-
* @signature (fn: Function|any) => (count: Number): Array
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* repeat(2)(3)
|
|
28
|
-
* // => [2, 2, 2]
|
|
29
|
-
*
|
|
30
|
-
* repeat(index => index + 1, 3)
|
|
31
|
-
* // => [1, 2, 3]
|
|
32
|
-
*/ export var repeat = function() {
|
|
33
|
-
for(var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++){
|
|
34
|
-
params[_key] = arguments[_key];
|
|
35
|
-
}
|
|
36
|
-
// @signature (fn) => (input)
|
|
37
|
-
if (params.length <= 1) {
|
|
38
|
-
return function(input) {
|
|
39
|
-
return _repeat(params[0], input);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
// @signature (fn, input)
|
|
43
|
-
return _repeat.apply(void 0, _to_consumable_array(params));
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
//# sourceMappingURL=repeat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/repeat/repeat.js"],"sourcesContent":["import { pipe } from \"../pipe/pipe.js\"\n\nconst _repeat = (_fn, count = 0) => {\n const result = []\n const fn = Array.isArray(_fn) ? pipe(..._fn) : _fn\n const isFunction = typeof fn === \"function\"\n\n for (let i = 0; i < count; i++) {\n result.push(isFunction ? fn(i, result) : fn)\n }\n\n return result\n}\n\n/**\n * Return an array of fixed size containing a specified value or function result\n *\n * @param {Function|any} fn Function or value to repeat\n * @param {number} input Number of times\n * @param {...any} params Function params\n *\n * @returns {Array}\n *\n * @name repeat\n * @tag Array\n * @signature (fn: Function|any) => (count: Number): Array\n *\n * @example\n * repeat(2)(3)\n * // => [2, 2, 2]\n *\n * repeat(index => index + 1, 3)\n * // => [1, 2, 3]\n */\nexport const repeat = (...params) => {\n // @signature (fn) => (input)\n if (params.length <= 1) {\n return input => _repeat(params[0], input)\n }\n\n // @signature (fn, input)\n return _repeat(...params)\n}\n"],"names":["pipe","_repeat","_fn","count","result","fn","Array","isArray","isFunction","i","push","repeat","params","length","input"],"mappings":"AAAA;AAAA,SAASA,IAAI,QAAQ,iBAAiB,CAAA;AAEtC,IAAMC,OAAO,GAAG,SAACC,GAAG,EAAgB;QAAdC,KAAK,oEAAG,CAAC;IAC7B,IAAMC,MAAM,GAAG,EAAE;IACjB,IAAMC,EAAE,GAAGC,KAAK,CAACC,OAAO,CAACL,GAAG,CAAC,GAAGF,IAAI,CAAJA,KAAY,CAAZA,KAAAA,CAAI,EAAC,qBAAGE,GAAG,CAAHA,CAAI,GAAGA,GAAG;IAClD,IAAMM,UAAU,GAAG,OAAOH,EAAE,KAAK,UAAU;IAE3C,IAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGN,KAAK,EAAEM,CAAC,EAAE,CAAE;QAC9BL,MAAM,CAACM,IAAI,CAACF,UAAU,GAAGH,EAAE,CAACI,CAAC,EAAEL,MAAM,CAAC,GAAGC,EAAE,CAAC;IAC9C,CAAC;IAED,OAAOD,MAAM,CAAA;AACf,CAAC;AAED;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,IAAMO,MAAM,GAAG,WAAe;qCAAXC,MAAM;QAANA,MAAM;;IAC9B,6BAA6B;IAC7B,IAAIA,MAAM,CAACC,MAAM,IAAI,CAAC,EAAE;QACtB,OAAOC,SAAAA,KAAK;mBAAIb,OAAO,CAACW,MAAM,CAAC,CAAC,CAAC,EAAEE,KAAK,CAAC;SAAA,CAAA;IAC3C,CAAC;IAED,yBAAyB;IACzB,OAAOb,OAAO,CAAPA,KAAkB,CAAlBA,KAAAA,CAAO,EAAC,qBAAGW,MAAM,CAANA,CAAO,CAAA;AAC3B,CAAC,CAAA"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import test from "tape";
|
|
2
|
-
import { repeat } from "./repeat.js";
|
|
3
|
-
var inc = function(x) {
|
|
4
|
-
return x + 1;
|
|
5
|
-
};
|
|
6
|
-
test("repeat", function(t) {
|
|
7
|
-
t.deepEqual(repeat(inc)(5), [
|
|
8
|
-
1,
|
|
9
|
-
2,
|
|
10
|
-
3,
|
|
11
|
-
4,
|
|
12
|
-
5
|
|
13
|
-
], "Repeat function curried");
|
|
14
|
-
t.deepEqual(repeat(inc, 2), [
|
|
15
|
-
1,
|
|
16
|
-
2
|
|
17
|
-
], "Repeat function uncurried ");
|
|
18
|
-
t.deepEqual(repeat([
|
|
19
|
-
inc,
|
|
20
|
-
inc
|
|
21
|
-
], 2), [
|
|
22
|
-
2,
|
|
23
|
-
3
|
|
24
|
-
], "Repeat with function chain");
|
|
25
|
-
t.deepEqual(repeat(inc)(), [], "Repeat without count");
|
|
26
|
-
t.deepEqual(repeat(3, 2), [
|
|
27
|
-
3,
|
|
28
|
-
3
|
|
29
|
-
], "Repeat value curried ");
|
|
30
|
-
t.end();
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
//# sourceMappingURL=repeat.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/repeat/repeat.test.js"],"sourcesContent":["import test from \"tape\"\n\nimport { repeat } from \"./repeat.js\"\n\nconst inc = x => x + 1\n\ntest(\"repeat\", t => {\n t.deepEqual(repeat(inc)(5), [1, 2, 3, 4, 5], \"Repeat function curried\")\n t.deepEqual(repeat(inc, 2), [1, 2], \"Repeat function uncurried \")\n t.deepEqual(repeat([inc, inc], 2), [2, 3], \"Repeat with function chain\")\n\n t.deepEqual(repeat(inc)(), [], \"Repeat without count\")\n t.deepEqual(repeat(3, 2), [3, 3], \"Repeat value curried \")\n\n t.end()\n})\n"],"names":["test","repeat","inc","x","t","deepEqual","end"],"mappings":"AAAA,OAAOA,IAAI,MAAM,MAAM,CAAA;AAEvB,SAASC,MAAM,QAAQ,aAAa,CAAA;AAEpC,IAAMC,GAAG,GAAGC,SAAAA,CAAC;WAAIA,CAAC,GAAG,CAAC;CAAA;AAEtBH,IAAI,CAAC,QAAQ,EAAEI,SAAAA,CAAC,EAAI;IAClBA,CAAC,CAACC,SAAS,CAACJ,MAAM,CAACC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;AAAC,SAAC;AAAE,SAAC;AAAE,SAAC;AAAE,SAAC;AAAE,SAAC;KAAC,EAAE,yBAAyB,CAAC;IACvEE,CAAC,CAACC,SAAS,CAACJ,MAAM,CAACC,GAAG,EAAE,CAAC,CAAC,EAAE;AAAC,SAAC;AAAE,SAAC;KAAC,EAAE,4BAA4B,CAAC;IACjEE,CAAC,CAACC,SAAS,CAACJ,MAAM,CAAC;QAACC,GAAG;QAAEA,GAAG;KAAC,EAAE,CAAC,CAAC,EAAE;AAAC,SAAC;AAAE,SAAC;KAAC,EAAE,4BAA4B,CAAC;IAExEE,CAAC,CAACC,SAAS,CAACJ,MAAM,CAACC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,sBAAsB,CAAC;IACtDE,CAAC,CAACC,SAAS,CAACJ,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAAC,SAAC;AAAE,SAAC;KAAC,EAAE,uBAAuB,CAAC;IAE1DG,CAAC,CAACE,GAAG,EAAE;AACT,CAAC,CAAC"}
|