@vinicunca/perkakas 0.0.4 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2276 -0
- package/dist/index.d.cts +3230 -0
- package/dist/index.d.ts +3230 -0
- package/dist/index.js +2135 -0
- package/dist/index.min.js +2 -0
- package/dist/index.min.js.map +7 -0
- package/package.json +38 -30
- package/dist/commonjs/aria/index.d.ts +0 -2
- package/dist/commonjs/aria/index.d.ts.map +0 -1
- package/dist/commonjs/aria/index.js +0 -17
- package/dist/commonjs/aria/key-codes.d.ts +0 -23
- package/dist/commonjs/aria/key-codes.d.ts.map +0 -1
- package/dist/commonjs/aria/key-codes.js +0 -25
- package/dist/commonjs/array/all-pass.d.ts +0 -3
- package/dist/commonjs/array/all-pass.d.ts.map +0 -1
- package/dist/commonjs/array/all-pass.js +0 -11
- package/dist/commonjs/array/any-pass.d.ts +0 -3
- package/dist/commonjs/array/any-pass.d.ts.map +0 -1
- package/dist/commonjs/array/any-pass.js +0 -11
- package/dist/commonjs/array/chunk.d.ts +0 -6
- package/dist/commonjs/array/chunk.d.ts.map +0 -1
- package/dist/commonjs/array/chunk.js +0 -17
- package/dist/commonjs/array/compact.d.ts +0 -2
- package/dist/commonjs/array/compact.d.ts.map +0 -1
- package/dist/commonjs/array/compact.js +0 -8
- package/dist/commonjs/array/concat.d.ts +0 -3
- package/dist/commonjs/array/concat.d.ts.map +0 -1
- package/dist/commonjs/array/concat.js +0 -11
- package/dist/commonjs/array/count-by.d.ts +0 -8
- package/dist/commonjs/array/count-by.d.ts.map +0 -1
- package/dist/commonjs/array/count-by.js +0 -22
- package/dist/commonjs/array/difference-with.d.ts +0 -9
- package/dist/commonjs/array/difference-with.d.ts.map +0 -1
- package/dist/commonjs/array/difference-with.js +0 -31
- package/dist/commonjs/array/difference.d.ts +0 -7
- package/dist/commonjs/array/difference.d.ts.map +0 -1
- package/dist/commonjs/array/difference.js +0 -32
- package/dist/commonjs/array/drop-last.d.ts +0 -3
- package/dist/commonjs/array/drop-last.d.ts.map +0 -1
- package/dist/commonjs/array/drop-last.js +0 -15
- package/dist/commonjs/array/drop.d.ts +0 -7
- package/dist/commonjs/array/drop.d.ts.map +0 -1
- package/dist/commonjs/array/drop.js +0 -32
- package/dist/commonjs/array/filter.d.ts +0 -17
- package/dist/commonjs/array/filter.d.ts.map +0 -1
- package/dist/commonjs/array/filter.js +0 -41
- package/dist/commonjs/array/find-index.d.ts +0 -32
- package/dist/commonjs/array/find-index.d.ts.map +0 -1
- package/dist/commonjs/array/find-index.js +0 -46
- package/dist/commonjs/array/find-last-index.d.ts +0 -8
- package/dist/commonjs/array/find-last-index.d.ts.map +0 -1
- package/dist/commonjs/array/find-last-index.js +0 -24
- package/dist/commonjs/array/find-last.d.ts +0 -8
- package/dist/commonjs/array/find-last.d.ts.map +0 -1
- package/dist/commonjs/array/find-last.js +0 -23
- package/dist/commonjs/array/find.d.ts +0 -24
- package/dist/commonjs/array/find.d.ts.map +0 -1
- package/dist/commonjs/array/find.js +0 -38
- package/dist/commonjs/array/first.d.ts +0 -16
- package/dist/commonjs/array/first.d.ts.map +0 -1
- package/dist/commonjs/array/first.js +0 -26
- package/dist/commonjs/array/flat-map-to-obj.d.ts +0 -7
- package/dist/commonjs/array/flat-map-to-obj.d.ts.map +0 -1
- package/dist/commonjs/array/flat-map-to-obj.js +0 -25
- package/dist/commonjs/array/flat-map.d.ts +0 -16
- package/dist/commonjs/array/flat-map.d.ts.map +0 -1
- package/dist/commonjs/array/flat-map.js +0 -33
- package/dist/commonjs/array/flatten-deep.d.ts +0 -12
- package/dist/commonjs/array/flatten-deep.d.ts.map +0 -1
- package/dist/commonjs/array/flatten-deep.js +0 -48
- package/dist/commonjs/array/flatten.d.ts +0 -9
- package/dist/commonjs/array/flatten.d.ts.map +0 -1
- package/dist/commonjs/array/flatten.js +0 -32
- package/dist/commonjs/array/for-each.d.ts +0 -13
- package/dist/commonjs/array/for-each.d.ts.map +0 -1
- package/dist/commonjs/array/for-each.js +0 -40
- package/dist/commonjs/array/group-by.d.ts +0 -19
- package/dist/commonjs/array/group-by.d.ts.map +0 -1
- package/dist/commonjs/array/group-by.js +0 -31
- package/dist/commonjs/array/index-by.d.ts +0 -8
- package/dist/commonjs/array/index-by.d.ts.map +0 -1
- package/dist/commonjs/array/index-by.js +0 -24
- package/dist/commonjs/array/index.d.ts +0 -56
- package/dist/commonjs/array/index.d.ts.map +0 -1
- package/dist/commonjs/array/index.js +0 -71
- package/dist/commonjs/array/intersection-with.d.ts +0 -9
- package/dist/commonjs/array/intersection-with.d.ts.map +0 -1
- package/dist/commonjs/array/intersection-with.js +0 -31
- package/dist/commonjs/array/intersection.d.ts +0 -7
- package/dist/commonjs/array/intersection.d.ts.map +0 -1
- package/dist/commonjs/array/intersection.js +0 -32
- package/dist/commonjs/array/join.d.ts +0 -8
- package/dist/commonjs/array/join.d.ts.map +0 -1
- package/dist/commonjs/array/join.js +0 -11
- package/dist/commonjs/array/last.d.ts +0 -5
- package/dist/commonjs/array/last.d.ts.map +0 -1
- package/dist/commonjs/array/last.js +0 -11
- package/dist/commonjs/array/length.d.ts +0 -5
- package/dist/commonjs/array/length.d.ts.map +0 -1
- package/dist/commonjs/array/length.js +0 -11
- package/dist/commonjs/array/map-to-obj.d.ts +0 -7
- package/dist/commonjs/array/map-to-obj.d.ts.map +0 -1
- package/dist/commonjs/array/map-to-obj.js +0 -23
- package/dist/commonjs/array/map.d.ts +0 -26
- package/dist/commonjs/array/map.d.ts.map +0 -1
- package/dist/commonjs/array/map.js +0 -35
- package/dist/commonjs/array/max-by.d.ts +0 -8
- package/dist/commonjs/array/max-by.d.ts.map +0 -1
- package/dist/commonjs/array/max-by.js +0 -28
- package/dist/commonjs/array/mean-by.d.ts +0 -8
- package/dist/commonjs/array/mean-by.d.ts.map +0 -1
- package/dist/commonjs/array/mean-by.js +0 -26
- package/dist/commonjs/array/merge-all.d.ts +0 -7
- package/dist/commonjs/array/merge-all.d.ts.map +0 -1
- package/dist/commonjs/array/merge-all.js +0 -7
- package/dist/commonjs/array/min-by.d.ts +0 -8
- package/dist/commonjs/array/min-by.d.ts.map +0 -1
- package/dist/commonjs/array/min-by.js +0 -28
- package/dist/commonjs/array/partition.d.ts +0 -10
- package/dist/commonjs/array/partition.d.ts.map +0 -1
- package/dist/commonjs/array/partition.js +0 -24
- package/dist/commonjs/array/range.d.ts +0 -3
- package/dist/commonjs/array/range.d.ts.map +0 -1
- package/dist/commonjs/array/range.js +0 -15
- package/dist/commonjs/array/reduce.d.ts +0 -7
- package/dist/commonjs/array/reduce.d.ts.map +0 -1
- package/dist/commonjs/array/reduce.js +0 -19
- package/dist/commonjs/array/reject.d.ts +0 -13
- package/dist/commonjs/array/reject.d.ts.map +0 -1
- package/dist/commonjs/array/reject.js +0 -41
- package/dist/commonjs/array/reverse.d.ts +0 -6
- package/dist/commonjs/array/reverse.d.ts.map +0 -1
- package/dist/commonjs/array/reverse.js +0 -11
- package/dist/commonjs/array/sample.d.ts +0 -11
- package/dist/commonjs/array/sample.d.ts.map +0 -1
- package/dist/commonjs/array/sample.js +0 -34
- package/dist/commonjs/array/shuffle.d.ts +0 -3
- package/dist/commonjs/array/shuffle.d.ts.map +0 -1
- package/dist/commonjs/array/shuffle.js +0 -18
- package/dist/commonjs/array/sort-by.d.ts +0 -27
- package/dist/commonjs/array/sort-by.d.ts.map +0 -1
- package/dist/commonjs/array/sort-by.js +0 -55
- package/dist/commonjs/array/sort.d.ts +0 -15
- package/dist/commonjs/array/sort.d.ts.map +0 -1
- package/dist/commonjs/array/sort.js +0 -16
- package/dist/commonjs/array/split-at.d.ts +0 -3
- package/dist/commonjs/array/split-at.d.ts.map +0 -1
- package/dist/commonjs/array/split-at.js +0 -13
- package/dist/commonjs/array/split-when.d.ts +0 -3
- package/dist/commonjs/array/split-when.d.ts.map +0 -1
- package/dist/commonjs/array/split-when.js +0 -17
- package/dist/commonjs/array/sum-by.d.ts +0 -8
- package/dist/commonjs/array/sum-by.d.ts.map +0 -1
- package/dist/commonjs/array/sum-by.js +0 -24
- package/dist/commonjs/array/swap-indices.d.ts +0 -25
- package/dist/commonjs/array/swap-indices.d.ts.map +0 -1
- package/dist/commonjs/array/swap-indices.js +0 -34
- package/dist/commonjs/array/take-while.d.ts +0 -3
- package/dist/commonjs/array/take-while.d.ts.map +0 -1
- package/dist/commonjs/array/take-while.js +0 -18
- package/dist/commonjs/array/take.d.ts +0 -7
- package/dist/commonjs/array/take.d.ts.map +0 -1
- package/dist/commonjs/array/take.js +0 -38
- package/dist/commonjs/array/uniq-by.d.ts +0 -3
- package/dist/commonjs/array/uniq-by.d.ts.map +0 -1
- package/dist/commonjs/array/uniq-by.js +0 -30
- package/dist/commonjs/array/uniq-with.d.ts +0 -12
- package/dist/commonjs/array/uniq-with.d.ts.map +0 -1
- package/dist/commonjs/array/uniq-with.js +0 -33
- package/dist/commonjs/array/uniq.d.ts +0 -7
- package/dist/commonjs/array/uniq.d.ts.map +0 -1
- package/dist/commonjs/array/uniq.js +0 -32
- package/dist/commonjs/array/zip-obj.d.ts +0 -3
- package/dist/commonjs/array/zip-obj.d.ts.map +0 -1
- package/dist/commonjs/array/zip-obj.js +0 -16
- package/dist/commonjs/array/zip-with.d.ts +0 -4
- package/dist/commonjs/array/zip-with.d.ts.map +0 -1
- package/dist/commonjs/array/zip-with.js +0 -28
- package/dist/commonjs/array/zip.d.ts +0 -3
- package/dist/commonjs/array/zip.d.ts.map +0 -1
- package/dist/commonjs/array/zip.js +0 -16
- package/dist/commonjs/base.d.ts +0 -2
- package/dist/commonjs/base.d.ts.map +0 -1
- package/dist/commonjs/base.js +0 -7
- package/dist/commonjs/function/create-pipe.d.ts +0 -8
- package/dist/commonjs/function/create-pipe.d.ts.map +0 -1
- package/dist/commonjs/function/create-pipe.js +0 -8
- package/dist/commonjs/function/identity.d.ts +0 -2
- package/dist/commonjs/function/identity.d.ts.map +0 -1
- package/dist/commonjs/function/identity.js +0 -7
- package/dist/commonjs/function/index.d.ts +0 -7
- package/dist/commonjs/function/index.d.ts.map +0 -1
- package/dist/commonjs/function/index.js +0 -22
- package/dist/commonjs/function/noop.d.ts +0 -2
- package/dist/commonjs/function/noop.d.ts.map +0 -1
- package/dist/commonjs/function/noop.js +0 -7
- package/dist/commonjs/function/once.d.ts +0 -2
- package/dist/commonjs/function/once.d.ts.map +0 -1
- package/dist/commonjs/function/once.js +0 -15
- package/dist/commonjs/function/pipe.d.ts +0 -16
- package/dist/commonjs/function/pipe.d.ts.map +0 -1
- package/dist/commonjs/function/pipe.js +0 -105
- package/dist/commonjs/function/purry.d.ts +0 -2
- package/dist/commonjs/function/purry.d.ts.map +0 -1
- package/dist/commonjs/function/purry.js +0 -20
- package/dist/commonjs/guard/index.d.ts +0 -16
- package/dist/commonjs/guard/index.d.ts.map +0 -1
- package/dist/commonjs/guard/index.js +0 -31
- package/dist/commonjs/guard/is-array.d.ts +0 -4
- package/dist/commonjs/guard/is-array.d.ts.map +0 -1
- package/dist/commonjs/guard/is-array.js +0 -7
- package/dist/commonjs/guard/is-boolean.d.ts +0 -4
- package/dist/commonjs/guard/is-boolean.d.ts.map +0 -1
- package/dist/commonjs/guard/is-boolean.js +0 -7
- package/dist/commonjs/guard/is-date.d.ts +0 -2
- package/dist/commonjs/guard/is-date.d.ts.map +0 -1
- package/dist/commonjs/guard/is-date.js +0 -7
- package/dist/commonjs/guard/is-defined.d.ts +0 -5
- package/dist/commonjs/guard/is-defined.d.ts.map +0 -1
- package/dist/commonjs/guard/is-defined.js +0 -13
- package/dist/commonjs/guard/is-empty.d.ts +0 -4
- package/dist/commonjs/guard/is-empty.d.ts.map +0 -1
- package/dist/commonjs/guard/is-empty.js +0 -19
- package/dist/commonjs/guard/is-error.d.ts +0 -4
- package/dist/commonjs/guard/is-error.d.ts.map +0 -1
- package/dist/commonjs/guard/is-error.js +0 -7
- package/dist/commonjs/guard/is-function.d.ts +0 -4
- package/dist/commonjs/guard/is-function.d.ts.map +0 -1
- package/dist/commonjs/guard/is-function.js +0 -7
- package/dist/commonjs/guard/is-nil.d.ts +0 -2
- package/dist/commonjs/guard/is-nil.d.ts.map +0 -1
- package/dist/commonjs/guard/is-nil.js +0 -7
- package/dist/commonjs/guard/is-non-null.d.ts +0 -2
- package/dist/commonjs/guard/is-non-null.d.ts.map +0 -1
- package/dist/commonjs/guard/is-non-null.js +0 -7
- package/dist/commonjs/guard/is-not.d.ts +0 -3
- package/dist/commonjs/guard/is-not.d.ts.map +0 -1
- package/dist/commonjs/guard/is-not.js +0 -9
- package/dist/commonjs/guard/is-number.d.ts +0 -4
- package/dist/commonjs/guard/is-number.d.ts.map +0 -1
- package/dist/commonjs/guard/is-number.js +0 -7
- package/dist/commonjs/guard/is-object.d.ts +0 -4
- package/dist/commonjs/guard/is-object.d.ts.map +0 -1
- package/dist/commonjs/guard/is-object.js +0 -8
- package/dist/commonjs/guard/is-promise.d.ts +0 -2
- package/dist/commonjs/guard/is-promise.d.ts.map +0 -1
- package/dist/commonjs/guard/is-promise.js +0 -7
- package/dist/commonjs/guard/is-string.d.ts +0 -4
- package/dist/commonjs/guard/is-string.d.ts.map +0 -1
- package/dist/commonjs/guard/is-string.js +0 -7
- package/dist/commonjs/guard/is-truthy.d.ts +0 -2
- package/dist/commonjs/guard/is-truthy.d.ts.map +0 -1
- package/dist/commonjs/guard/is-truthy.js +0 -7
- package/dist/commonjs/helpers/index.d.ts +0 -8
- package/dist/commonjs/helpers/index.d.ts.map +0 -1
- package/dist/commonjs/helpers/index.js +0 -52
- package/dist/commonjs/index.d.ts +0 -11
- package/dist/commonjs/index.d.ts.map +0 -1
- package/dist/commonjs/index.js +0 -27
- package/dist/commonjs/number/clamp.d.ts +0 -9
- package/dist/commonjs/number/clamp.d.ts.map +0 -1
- package/dist/commonjs/number/clamp.js +0 -17
- package/dist/commonjs/number/index.d.ts +0 -2
- package/dist/commonjs/number/index.d.ts.map +0 -1
- package/dist/commonjs/number/index.js +0 -17
- package/dist/commonjs/object/add-prop.d.ts +0 -7
- package/dist/commonjs/object/add-prop.d.ts.map +0 -1
- package/dist/commonjs/object/add-prop.js +0 -11
- package/dist/commonjs/object/clone.d.ts +0 -2
- package/dist/commonjs/object/clone.d.ts.map +0 -1
- package/dist/commonjs/object/clone.js +0 -49
- package/dist/commonjs/object/equals.d.ts +0 -3
- package/dist/commonjs/object/equals.d.ts.map +0 -1
- package/dist/commonjs/object/equals.js +0 -71
- package/dist/commonjs/object/for-each-obj.d.ts +0 -10
- package/dist/commonjs/object/for-each-obj.d.ts.map +0 -1
- package/dist/commonjs/object/for-each-obj.js +0 -30
- package/dist/commonjs/object/from-pairs.d.ts +0 -21
- package/dist/commonjs/object/from-pairs.d.ts.map +0 -1
- package/dist/commonjs/object/from-pairs.js +0 -14
- package/dist/commonjs/object/index.d.ts +0 -23
- package/dist/commonjs/object/index.d.ts.map +0 -1
- package/dist/commonjs/object/index.js +0 -38
- package/dist/commonjs/object/invert.d.ts +0 -5
- package/dist/commonjs/object/invert.d.ts.map +0 -1
- package/dist/commonjs/object/invert.js +0 -15
- package/dist/commonjs/object/keys.d.ts +0 -15
- package/dist/commonjs/object/keys.d.ts.map +0 -1
- package/dist/commonjs/object/keys.js +0 -10
- package/dist/commonjs/object/map-keys.d.ts +0 -3
- package/dist/commonjs/object/map-keys.d.ts.map +0 -1
- package/dist/commonjs/object/map-keys.js +0 -16
- package/dist/commonjs/object/map-values.d.ts +0 -3
- package/dist/commonjs/object/map-values.d.ts.map +0 -1
- package/dist/commonjs/object/map-values.js +0 -16
- package/dist/commonjs/object/merge.d.ts +0 -3
- package/dist/commonjs/object/merge.d.ts.map +0 -1
- package/dist/commonjs/object/merge.js +0 -11
- package/dist/commonjs/object/omit-by.d.ts +0 -3
- package/dist/commonjs/object/omit-by.d.ts.map +0 -1
- package/dist/commonjs/object/omit-by.js +0 -16
- package/dist/commonjs/object/omit.d.ts +0 -3
- package/dist/commonjs/object/omit.d.ts.map +0 -1
- package/dist/commonjs/object/omit.js +0 -35
- package/dist/commonjs/object/path-or.d.ts +0 -21
- package/dist/commonjs/object/path-or.d.ts.map +0 -1
- package/dist/commonjs/object/path-or.js +0 -18
- package/dist/commonjs/object/pick-by.d.ts +0 -3
- package/dist/commonjs/object/pick-by.d.ts.map +0 -1
- package/dist/commonjs/object/pick-by.js +0 -19
- package/dist/commonjs/object/pick.d.ts +0 -3
- package/dist/commonjs/object/pick.d.ts.map +0 -1
- package/dist/commonjs/object/pick.js +0 -19
- package/dist/commonjs/object/prop.d.ts +0 -2
- package/dist/commonjs/object/prop.d.ts.map +0 -1
- package/dist/commonjs/object/prop.js +0 -5
- package/dist/commonjs/object/set-path.d.ts +0 -6
- package/dist/commonjs/object/set-path.d.ts.map +0 -1
- package/dist/commonjs/object/set-path.js +0 -23
- package/dist/commonjs/object/set.d.ts +0 -3
- package/dist/commonjs/object/set.d.ts.map +0 -1
- package/dist/commonjs/object/set.js +0 -11
- package/dist/commonjs/object/swap-props.d.ts +0 -7
- package/dist/commonjs/object/swap-props.d.ts.map +0 -1
- package/dist/commonjs/object/swap-props.js +0 -12
- package/dist/commonjs/object/to-pairs.d.ts +0 -13
- package/dist/commonjs/object/to-pairs.d.ts.map +0 -1
- package/dist/commonjs/object/to-pairs.js +0 -13
- package/dist/commonjs/object/values.d.ts +0 -2
- package/dist/commonjs/object/values.d.ts.map +0 -1
- package/dist/commonjs/object/values.js +0 -7
- package/dist/commonjs/string/cases-types.d.ts +0 -29
- package/dist/commonjs/string/cases-types.d.ts.map +0 -1
- package/dist/commonjs/string/cases-types.js +0 -2
- package/dist/commonjs/string/cases.d.ts +0 -16
- package/dist/commonjs/string/cases.d.ts.map +0 -1
- package/dist/commonjs/string/cases.js +0 -86
- package/dist/commonjs/string/index.d.ts +0 -4
- package/dist/commonjs/string/index.d.ts.map +0 -1
- package/dist/commonjs/string/index.js +0 -19
- package/dist/commonjs/string/random-string.d.ts +0 -2
- package/dist/commonjs/string/random-string.d.ts.map +0 -1
- package/dist/commonjs/string/random-string.js +0 -10
- package/dist/commonjs/string/string-to-path.d.ts +0 -3
- package/dist/commonjs/string/string-to-path.d.ts.map +0 -1
- package/dist/commonjs/string/string-to-path.js +0 -19
- package/dist/commonjs/type/index.d.ts +0 -2
- package/dist/commonjs/type/index.d.ts.map +0 -1
- package/dist/commonjs/type/index.js +0 -17
- package/dist/commonjs/type/type.d.ts +0 -2
- package/dist/commonjs/type/type.d.ts.map +0 -1
- package/dist/commonjs/type/type.js +0 -11
- package/dist/commonjs/utils/narrow.d.ts +0 -8
- package/dist/commonjs/utils/narrow.d.ts.map +0 -1
- package/dist/commonjs/utils/narrow.js +0 -2
- package/dist/commonjs/utils/paths.d.ts +0 -9
- package/dist/commonjs/utils/paths.d.ts.map +0 -1
- package/dist/commonjs/utils/paths.js +0 -2
- package/dist/commonjs/utils/reduce-lazy.d.ts +0 -22
- package/dist/commonjs/utils/reduce-lazy.d.ts.map +0 -1
- package/dist/commonjs/utils/reduce-lazy.js +0 -18
- package/dist/commonjs/utils/to-lazy-indexed.d.ts +0 -4
- package/dist/commonjs/utils/to-lazy-indexed.d.ts.map +0 -1
- package/dist/commonjs/utils/to-lazy-indexed.js +0 -8
- package/dist/commonjs/utils/to-single.d.ts +0 -4
- package/dist/commonjs/utils/to-single.d.ts.map +0 -1
- package/dist/commonjs/utils/to-single.js +0 -8
- package/dist/commonjs/utils/types.d.ts +0 -6
- package/dist/commonjs/utils/types.d.ts.map +0 -1
- package/dist/commonjs/utils/types.js +0 -2
- package/dist/es/aria/index.d.ts +0 -2
- package/dist/es/aria/index.d.ts.map +0 -1
- package/dist/es/aria/index.js +0 -1
- package/dist/es/aria/key-codes.d.ts +0 -23
- package/dist/es/aria/key-codes.d.ts.map +0 -1
- package/dist/es/aria/key-codes.js +0 -22
- package/dist/es/array/all-pass.d.ts +0 -3
- package/dist/es/array/all-pass.d.ts.map +0 -1
- package/dist/es/array/all-pass.js +0 -7
- package/dist/es/array/any-pass.d.ts +0 -3
- package/dist/es/array/any-pass.d.ts.map +0 -1
- package/dist/es/array/any-pass.js +0 -7
- package/dist/es/array/chunk.d.ts +0 -6
- package/dist/es/array/chunk.d.ts.map +0 -1
- package/dist/es/array/chunk.js +0 -13
- package/dist/es/array/compact.d.ts +0 -2
- package/dist/es/array/compact.d.ts.map +0 -1
- package/dist/es/array/compact.js +0 -4
- package/dist/es/array/concat.d.ts +0 -3
- package/dist/es/array/concat.d.ts.map +0 -1
- package/dist/es/array/concat.js +0 -7
- package/dist/es/array/count-by.d.ts +0 -8
- package/dist/es/array/count-by.d.ts.map +0 -1
- package/dist/es/array/count-by.js +0 -18
- package/dist/es/array/difference-with.d.ts +0 -9
- package/dist/es/array/difference-with.d.ts.map +0 -1
- package/dist/es/array/difference-with.js +0 -27
- package/dist/es/array/difference.d.ts +0 -7
- package/dist/es/array/difference.d.ts.map +0 -1
- package/dist/es/array/difference.js +0 -28
- package/dist/es/array/drop-last.d.ts +0 -3
- package/dist/es/array/drop-last.d.ts.map +0 -1
- package/dist/es/array/drop-last.js +0 -11
- package/dist/es/array/drop.d.ts +0 -7
- package/dist/es/array/drop.d.ts.map +0 -1
- package/dist/es/array/drop.js +0 -28
- package/dist/es/array/filter.d.ts +0 -17
- package/dist/es/array/filter.d.ts.map +0 -1
- package/dist/es/array/filter.js +0 -37
- package/dist/es/array/find-index.d.ts +0 -32
- package/dist/es/array/find-index.d.ts.map +0 -1
- package/dist/es/array/find-index.js +0 -42
- package/dist/es/array/find-last-index.d.ts +0 -8
- package/dist/es/array/find-last-index.d.ts.map +0 -1
- package/dist/es/array/find-last-index.js +0 -20
- package/dist/es/array/find-last.d.ts +0 -8
- package/dist/es/array/find-last.d.ts.map +0 -1
- package/dist/es/array/find-last.js +0 -19
- package/dist/es/array/find.d.ts +0 -24
- package/dist/es/array/find.d.ts.map +0 -1
- package/dist/es/array/find.js +0 -34
- package/dist/es/array/first.d.ts +0 -16
- package/dist/es/array/first.d.ts.map +0 -1
- package/dist/es/array/first.js +0 -22
- package/dist/es/array/flat-map-to-obj.d.ts +0 -7
- package/dist/es/array/flat-map-to-obj.d.ts.map +0 -1
- package/dist/es/array/flat-map-to-obj.js +0 -21
- package/dist/es/array/flat-map.d.ts +0 -16
- package/dist/es/array/flat-map.d.ts.map +0 -1
- package/dist/es/array/flat-map.js +0 -29
- package/dist/es/array/flatten-deep.d.ts +0 -12
- package/dist/es/array/flatten-deep.d.ts.map +0 -1
- package/dist/es/array/flatten-deep.js +0 -44
- package/dist/es/array/flatten.d.ts +0 -9
- package/dist/es/array/flatten.d.ts.map +0 -1
- package/dist/es/array/flatten.js +0 -28
- package/dist/es/array/for-each.d.ts +0 -13
- package/dist/es/array/for-each.d.ts.map +0 -1
- package/dist/es/array/for-each.js +0 -36
- package/dist/es/array/group-by.d.ts +0 -19
- package/dist/es/array/group-by.d.ts.map +0 -1
- package/dist/es/array/group-by.js +0 -27
- package/dist/es/array/index-by.d.ts +0 -8
- package/dist/es/array/index-by.d.ts.map +0 -1
- package/dist/es/array/index-by.js +0 -20
- package/dist/es/array/index.d.ts +0 -56
- package/dist/es/array/index.d.ts.map +0 -1
- package/dist/es/array/index.js +0 -55
- package/dist/es/array/intersection-with.d.ts +0 -9
- package/dist/es/array/intersection-with.d.ts.map +0 -1
- package/dist/es/array/intersection-with.js +0 -27
- package/dist/es/array/intersection.d.ts +0 -7
- package/dist/es/array/intersection.d.ts.map +0 -1
- package/dist/es/array/intersection.js +0 -28
- package/dist/es/array/join.d.ts +0 -8
- package/dist/es/array/join.d.ts.map +0 -1
- package/dist/es/array/join.js +0 -7
- package/dist/es/array/last.d.ts +0 -5
- package/dist/es/array/last.d.ts.map +0 -1
- package/dist/es/array/last.js +0 -7
- package/dist/es/array/length.d.ts +0 -5
- package/dist/es/array/length.d.ts.map +0 -1
- package/dist/es/array/length.js +0 -7
- package/dist/es/array/map-to-obj.d.ts +0 -7
- package/dist/es/array/map-to-obj.d.ts.map +0 -1
- package/dist/es/array/map-to-obj.js +0 -19
- package/dist/es/array/map.d.ts +0 -26
- package/dist/es/array/map.d.ts.map +0 -1
- package/dist/es/array/map.js +0 -31
- package/dist/es/array/max-by.d.ts +0 -8
- package/dist/es/array/max-by.d.ts.map +0 -1
- package/dist/es/array/max-by.js +0 -24
- package/dist/es/array/mean-by.d.ts +0 -8
- package/dist/es/array/mean-by.d.ts.map +0 -1
- package/dist/es/array/mean-by.js +0 -22
- package/dist/es/array/merge-all.d.ts +0 -7
- package/dist/es/array/merge-all.d.ts.map +0 -1
- package/dist/es/array/merge-all.js +0 -3
- package/dist/es/array/min-by.d.ts +0 -8
- package/dist/es/array/min-by.d.ts.map +0 -1
- package/dist/es/array/min-by.js +0 -24
- package/dist/es/array/partition.d.ts +0 -10
- package/dist/es/array/partition.d.ts.map +0 -1
- package/dist/es/array/partition.js +0 -20
- package/dist/es/array/range.d.ts +0 -3
- package/dist/es/array/range.d.ts.map +0 -1
- package/dist/es/array/range.js +0 -11
- package/dist/es/array/reduce.d.ts +0 -7
- package/dist/es/array/reduce.d.ts.map +0 -1
- package/dist/es/array/reduce.js +0 -15
- package/dist/es/array/reject.d.ts +0 -13
- package/dist/es/array/reject.d.ts.map +0 -1
- package/dist/es/array/reject.js +0 -37
- package/dist/es/array/reverse.d.ts +0 -6
- package/dist/es/array/reverse.d.ts.map +0 -1
- package/dist/es/array/reverse.js +0 -7
- package/dist/es/array/sample.d.ts +0 -11
- package/dist/es/array/sample.d.ts.map +0 -1
- package/dist/es/array/sample.js +0 -30
- package/dist/es/array/shuffle.d.ts +0 -3
- package/dist/es/array/shuffle.d.ts.map +0 -1
- package/dist/es/array/shuffle.js +0 -14
- package/dist/es/array/sort-by.d.ts +0 -27
- package/dist/es/array/sort-by.d.ts.map +0 -1
- package/dist/es/array/sort-by.js +0 -51
- package/dist/es/array/sort.d.ts +0 -15
- package/dist/es/array/sort.d.ts.map +0 -1
- package/dist/es/array/sort.js +0 -12
- package/dist/es/array/split-at.d.ts +0 -3
- package/dist/es/array/split-at.d.ts.map +0 -1
- package/dist/es/array/split-at.js +0 -9
- package/dist/es/array/split-when.d.ts +0 -3
- package/dist/es/array/split-when.d.ts.map +0 -1
- package/dist/es/array/split-when.js +0 -13
- package/dist/es/array/sum-by.d.ts +0 -8
- package/dist/es/array/sum-by.d.ts.map +0 -1
- package/dist/es/array/sum-by.js +0 -20
- package/dist/es/array/swap-indices.d.ts +0 -25
- package/dist/es/array/swap-indices.d.ts.map +0 -1
- package/dist/es/array/swap-indices.js +0 -30
- package/dist/es/array/take-while.d.ts +0 -3
- package/dist/es/array/take-while.d.ts.map +0 -1
- package/dist/es/array/take-while.js +0 -14
- package/dist/es/array/take.d.ts +0 -7
- package/dist/es/array/take.d.ts.map +0 -1
- package/dist/es/array/take.js +0 -34
- package/dist/es/array/uniq-by.d.ts +0 -3
- package/dist/es/array/uniq-by.d.ts.map +0 -1
- package/dist/es/array/uniq-by.js +0 -26
- package/dist/es/array/uniq-with.d.ts +0 -12
- package/dist/es/array/uniq-with.d.ts.map +0 -1
- package/dist/es/array/uniq-with.js +0 -29
- package/dist/es/array/uniq.d.ts +0 -7
- package/dist/es/array/uniq.d.ts.map +0 -1
- package/dist/es/array/uniq.js +0 -28
- package/dist/es/array/zip-obj.d.ts +0 -3
- package/dist/es/array/zip-obj.d.ts.map +0 -1
- package/dist/es/array/zip-obj.js +0 -12
- package/dist/es/array/zip-with.d.ts +0 -4
- package/dist/es/array/zip-with.d.ts.map +0 -1
- package/dist/es/array/zip-with.js +0 -24
- package/dist/es/array/zip.d.ts +0 -3
- package/dist/es/array/zip.d.ts.map +0 -1
- package/dist/es/array/zip.js +0 -12
- package/dist/es/base.d.ts +0 -2
- package/dist/es/base.d.ts.map +0 -1
- package/dist/es/base.js +0 -3
- package/dist/es/function/create-pipe.d.ts +0 -8
- package/dist/es/function/create-pipe.d.ts.map +0 -1
- package/dist/es/function/create-pipe.js +0 -4
- package/dist/es/function/identity.d.ts +0 -2
- package/dist/es/function/identity.d.ts.map +0 -1
- package/dist/es/function/identity.js +0 -3
- package/dist/es/function/index.d.ts +0 -7
- package/dist/es/function/index.d.ts.map +0 -1
- package/dist/es/function/index.js +0 -6
- package/dist/es/function/noop.d.ts +0 -2
- package/dist/es/function/noop.d.ts.map +0 -1
- package/dist/es/function/noop.js +0 -3
- package/dist/es/function/once.d.ts +0 -2
- package/dist/es/function/once.d.ts.map +0 -1
- package/dist/es/function/once.js +0 -11
- package/dist/es/function/pipe.d.ts +0 -16
- package/dist/es/function/pipe.d.ts.map +0 -1
- package/dist/es/function/pipe.js +0 -101
- package/dist/es/function/purry.d.ts +0 -2
- package/dist/es/function/purry.d.ts.map +0 -1
- package/dist/es/function/purry.js +0 -16
- package/dist/es/guard/index.d.ts +0 -16
- package/dist/es/guard/index.d.ts.map +0 -1
- package/dist/es/guard/index.js +0 -15
- package/dist/es/guard/is-array.d.ts +0 -4
- package/dist/es/guard/is-array.d.ts.map +0 -1
- package/dist/es/guard/is-array.js +0 -3
- package/dist/es/guard/is-boolean.d.ts +0 -4
- package/dist/es/guard/is-boolean.d.ts.map +0 -1
- package/dist/es/guard/is-boolean.js +0 -3
- package/dist/es/guard/is-date.d.ts +0 -2
- package/dist/es/guard/is-date.d.ts.map +0 -1
- package/dist/es/guard/is-date.js +0 -3
- package/dist/es/guard/is-defined.d.ts +0 -5
- package/dist/es/guard/is-defined.d.ts.map +0 -1
- package/dist/es/guard/is-defined.js +0 -9
- package/dist/es/guard/is-empty.d.ts +0 -4
- package/dist/es/guard/is-empty.d.ts.map +0 -1
- package/dist/es/guard/is-empty.js +0 -15
- package/dist/es/guard/is-error.d.ts +0 -4
- package/dist/es/guard/is-error.d.ts.map +0 -1
- package/dist/es/guard/is-error.js +0 -3
- package/dist/es/guard/is-function.d.ts +0 -4
- package/dist/es/guard/is-function.d.ts.map +0 -1
- package/dist/es/guard/is-function.js +0 -3
- package/dist/es/guard/is-nil.d.ts +0 -2
- package/dist/es/guard/is-nil.d.ts.map +0 -1
- package/dist/es/guard/is-nil.js +0 -3
- package/dist/es/guard/is-non-null.d.ts +0 -2
- package/dist/es/guard/is-non-null.d.ts.map +0 -1
- package/dist/es/guard/is-non-null.js +0 -3
- package/dist/es/guard/is-not.d.ts +0 -3
- package/dist/es/guard/is-not.d.ts.map +0 -1
- package/dist/es/guard/is-not.js +0 -5
- package/dist/es/guard/is-number.d.ts +0 -4
- package/dist/es/guard/is-number.d.ts.map +0 -1
- package/dist/es/guard/is-number.js +0 -3
- package/dist/es/guard/is-object.d.ts +0 -4
- package/dist/es/guard/is-object.d.ts.map +0 -1
- package/dist/es/guard/is-object.js +0 -4
- package/dist/es/guard/is-promise.d.ts +0 -2
- package/dist/es/guard/is-promise.d.ts.map +0 -1
- package/dist/es/guard/is-promise.js +0 -3
- package/dist/es/guard/is-string.d.ts +0 -4
- package/dist/es/guard/is-string.d.ts.map +0 -1
- package/dist/es/guard/is-string.js +0 -3
- package/dist/es/guard/is-truthy.d.ts +0 -2
- package/dist/es/guard/is-truthy.d.ts.map +0 -1
- package/dist/es/guard/is-truthy.js +0 -3
- package/dist/es/helpers/index.d.ts +0 -8
- package/dist/es/helpers/index.d.ts.map +0 -1
- package/dist/es/helpers/index.js +0 -45
- package/dist/es/index.d.ts +0 -11
- package/dist/es/index.d.ts.map +0 -1
- package/dist/es/index.js +0 -10
- package/dist/es/number/clamp.d.ts +0 -9
- package/dist/es/number/clamp.d.ts.map +0 -1
- package/dist/es/number/clamp.js +0 -13
- package/dist/es/number/index.d.ts +0 -2
- package/dist/es/number/index.d.ts.map +0 -1
- package/dist/es/number/index.js +0 -1
- package/dist/es/object/add-prop.d.ts +0 -7
- package/dist/es/object/add-prop.d.ts.map +0 -1
- package/dist/es/object/add-prop.js +0 -7
- package/dist/es/object/clone.d.ts +0 -2
- package/dist/es/object/clone.d.ts.map +0 -1
- package/dist/es/object/clone.js +0 -45
- package/dist/es/object/equals.d.ts +0 -3
- package/dist/es/object/equals.d.ts.map +0 -1
- package/dist/es/object/equals.js +0 -67
- package/dist/es/object/for-each-obj.d.ts +0 -10
- package/dist/es/object/for-each-obj.d.ts.map +0 -1
- package/dist/es/object/for-each-obj.js +0 -26
- package/dist/es/object/from-pairs.d.ts +0 -21
- package/dist/es/object/from-pairs.d.ts.map +0 -1
- package/dist/es/object/from-pairs.js +0 -10
- package/dist/es/object/index.d.ts +0 -23
- package/dist/es/object/index.d.ts.map +0 -1
- package/dist/es/object/index.js +0 -22
- package/dist/es/object/invert.d.ts +0 -5
- package/dist/es/object/invert.d.ts.map +0 -1
- package/dist/es/object/invert.js +0 -11
- package/dist/es/object/keys.d.ts +0 -15
- package/dist/es/object/keys.d.ts.map +0 -1
- package/dist/es/object/keys.js +0 -6
- package/dist/es/object/map-keys.d.ts +0 -3
- package/dist/es/object/map-keys.d.ts.map +0 -1
- package/dist/es/object/map-keys.js +0 -12
- package/dist/es/object/map-values.d.ts +0 -3
- package/dist/es/object/map-values.d.ts.map +0 -1
- package/dist/es/object/map-values.js +0 -12
- package/dist/es/object/merge.d.ts +0 -3
- package/dist/es/object/merge.d.ts.map +0 -1
- package/dist/es/object/merge.js +0 -7
- package/dist/es/object/omit-by.d.ts +0 -3
- package/dist/es/object/omit-by.d.ts.map +0 -1
- package/dist/es/object/omit-by.js +0 -12
- package/dist/es/object/omit.d.ts +0 -3
- package/dist/es/object/omit.d.ts.map +0 -1
- package/dist/es/object/omit.js +0 -31
- package/dist/es/object/path-or.d.ts +0 -21
- package/dist/es/object/path-or.d.ts.map +0 -1
- package/dist/es/object/path-or.js +0 -14
- package/dist/es/object/pick-by.d.ts +0 -3
- package/dist/es/object/pick-by.d.ts.map +0 -1
- package/dist/es/object/pick-by.js +0 -15
- package/dist/es/object/pick.d.ts +0 -3
- package/dist/es/object/pick.d.ts.map +0 -1
- package/dist/es/object/pick.js +0 -15
- package/dist/es/object/prop.d.ts +0 -2
- package/dist/es/object/prop.d.ts.map +0 -1
- package/dist/es/object/prop.js +0 -1
- package/dist/es/object/set-path.d.ts +0 -6
- package/dist/es/object/set-path.d.ts.map +0 -1
- package/dist/es/object/set-path.js +0 -18
- package/dist/es/object/set.d.ts +0 -3
- package/dist/es/object/set.d.ts.map +0 -1
- package/dist/es/object/set.js +0 -7
- package/dist/es/object/swap-props.d.ts +0 -7
- package/dist/es/object/swap-props.d.ts.map +0 -1
- package/dist/es/object/swap-props.js +0 -8
- package/dist/es/object/to-pairs.d.ts +0 -13
- package/dist/es/object/to-pairs.d.ts.map +0 -1
- package/dist/es/object/to-pairs.js +0 -9
- package/dist/es/object/values.d.ts +0 -2
- package/dist/es/object/values.d.ts.map +0 -1
- package/dist/es/object/values.js +0 -3
- package/dist/es/string/cases-types.d.ts +0 -29
- package/dist/es/string/cases-types.d.ts.map +0 -1
- package/dist/es/string/cases-types.js +0 -1
- package/dist/es/string/cases.d.ts +0 -16
- package/dist/es/string/cases.d.ts.map +0 -1
- package/dist/es/string/cases.js +0 -75
- package/dist/es/string/index.d.ts +0 -4
- package/dist/es/string/index.d.ts.map +0 -1
- package/dist/es/string/index.js +0 -3
- package/dist/es/string/random-string.d.ts +0 -2
- package/dist/es/string/random-string.d.ts.map +0 -1
- package/dist/es/string/random-string.js +0 -6
- package/dist/es/string/string-to-path.d.ts +0 -3
- package/dist/es/string/string-to-path.d.ts.map +0 -1
- package/dist/es/string/string-to-path.js +0 -15
- package/dist/es/type/index.d.ts +0 -2
- package/dist/es/type/index.d.ts.map +0 -1
- package/dist/es/type/index.js +0 -1
- package/dist/es/type/type.d.ts +0 -2
- package/dist/es/type/type.d.ts.map +0 -1
- package/dist/es/type/type.js +0 -7
- package/dist/es/utils/narrow.d.ts +0 -8
- package/dist/es/utils/narrow.d.ts.map +0 -1
- package/dist/es/utils/narrow.js +0 -1
- package/dist/es/utils/paths.d.ts +0 -9
- package/dist/es/utils/paths.d.ts.map +0 -1
- package/dist/es/utils/paths.js +0 -1
- package/dist/es/utils/reduce-lazy.d.ts +0 -22
- package/dist/es/utils/reduce-lazy.d.ts.map +0 -1
- package/dist/es/utils/reduce-lazy.js +0 -14
- package/dist/es/utils/to-lazy-indexed.d.ts +0 -4
- package/dist/es/utils/to-lazy-indexed.d.ts.map +0 -1
- package/dist/es/utils/to-lazy-indexed.js +0 -4
- package/dist/es/utils/to-single.d.ts +0 -4
- package/dist/es/utils/to-single.d.ts.map +0 -1
- package/dist/es/utils/to-single.js +0 -4
- package/dist/es/utils/types.d.ts +0 -6
- package/dist/es/utils/types.d.ts.map +0 -1
- package/dist/es/utils/types.js +0 -1
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flattenDeep = void 0;
|
|
4
|
-
const reduce_lazy_1 = require("../utils/reduce-lazy");
|
|
5
|
-
const function_1 = require("../function");
|
|
6
|
-
function flattenDeep() {
|
|
7
|
-
return (0, function_1.purry)(_flattenDeep, arguments, flattenDeep.lazy);
|
|
8
|
-
}
|
|
9
|
-
exports.flattenDeep = flattenDeep;
|
|
10
|
-
function _flattenDeep(items) {
|
|
11
|
-
return (0, reduce_lazy_1._reduceLazy)(items, flattenDeep.lazy());
|
|
12
|
-
}
|
|
13
|
-
function _flattenDeepValue(value) {
|
|
14
|
-
if (!Array.isArray(value)) {
|
|
15
|
-
return value;
|
|
16
|
-
}
|
|
17
|
-
const ret = [];
|
|
18
|
-
value.forEach((item) => {
|
|
19
|
-
if (Array.isArray(item)) {
|
|
20
|
-
ret.push(...flattenDeep(item));
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
ret.push(item);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return ret;
|
|
27
|
-
}
|
|
28
|
-
(function (flattenDeep) {
|
|
29
|
-
function lazy() {
|
|
30
|
-
return (value) => {
|
|
31
|
-
const next = _flattenDeepValue(value);
|
|
32
|
-
if (Array.isArray(next)) {
|
|
33
|
-
return {
|
|
34
|
-
done: false,
|
|
35
|
-
hasNext: true,
|
|
36
|
-
hasMany: true,
|
|
37
|
-
next,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
done: false,
|
|
42
|
-
hasNext: true,
|
|
43
|
-
next,
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
flattenDeep.lazy = lazy;
|
|
48
|
-
})(flattenDeep || (exports.flattenDeep = flattenDeep = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type LazyResult } from '../utils/reduce-lazy';
|
|
2
|
-
type Flatten<T> = T extends ReadonlyArray<infer K> ? K : T;
|
|
3
|
-
export declare function flatten<T>(items: ReadonlyArray<T>): Array<Flatten<T>>;
|
|
4
|
-
export declare function flatten<T>(): (items: ReadonlyArray<T>) => Array<Flatten<T>>;
|
|
5
|
-
export declare namespace flatten {
|
|
6
|
-
function lazy<T>(): (next: T) => LazyResult<any>;
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=flatten.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../../src/array/flatten.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAiB3D,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvE,wBAAgB,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAU7E,yBAAiB,OAAO,CAAC;IACvB,SAAgB,IAAI,CAAC,CAAC,YACN,CAAC,KAAG,WAAW,GAAG,CAAC,CAelC;CACF"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flatten = void 0;
|
|
4
|
-
const reduce_lazy_1 = require("../utils/reduce-lazy");
|
|
5
|
-
const function_1 = require("../function");
|
|
6
|
-
function flatten() {
|
|
7
|
-
return (0, function_1.purry)(_flatten, arguments, flatten.lazy);
|
|
8
|
-
}
|
|
9
|
-
exports.flatten = flatten;
|
|
10
|
-
function _flatten(items) {
|
|
11
|
-
return (0, reduce_lazy_1._reduceLazy)(items, flatten.lazy());
|
|
12
|
-
}
|
|
13
|
-
(function (flatten) {
|
|
14
|
-
function lazy() {
|
|
15
|
-
return (next) => {
|
|
16
|
-
if (Array.isArray(next)) {
|
|
17
|
-
return {
|
|
18
|
-
done: false,
|
|
19
|
-
hasNext: true,
|
|
20
|
-
hasMany: true,
|
|
21
|
-
next,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
done: false,
|
|
26
|
-
hasNext: true,
|
|
27
|
-
next,
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
flatten.lazy = lazy;
|
|
32
|
-
})(flatten || (exports.flatten = flatten = {}));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type LazyResult } from '../utils/reduce-lazy';
|
|
2
|
-
import { type Pred, type PredIndexed, type PredIndexedOptional } from '../utils/types';
|
|
3
|
-
export declare function forEach<T>(array: ReadonlyArray<T>, fn: Pred<T, void>): Array<T>;
|
|
4
|
-
export declare function forEach<T>(fn: Pred<T, void>): (array: ReadonlyArray<T>) => Array<T>;
|
|
5
|
-
export declare namespace forEach {
|
|
6
|
-
function indexed<T>(array: ReadonlyArray<T>, fn: PredIndexed<T, void>): Array<T>;
|
|
7
|
-
function indexed<T>(fn: PredIndexed<T, void>): (array: ReadonlyArray<T>) => Array<T>;
|
|
8
|
-
const lazy: <T>(fn: PredIndexedOptional<T, void>) => (value: T, index?: number | undefined, array?: T[] | undefined) => LazyResult<T>;
|
|
9
|
-
const lazyIndexed: (<T>(fn: PredIndexedOptional<T, void>) => (value: T, index?: number | undefined, array?: T[] | undefined) => LazyResult<T>) & {
|
|
10
|
-
indexed: true;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=for-each.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"for-each.d.ts","sourceRoot":"","sources":["../../../src/array/for-each.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAsBvF,wBAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,GAChB,KAAK,CAAC,CAAC,CAAC,CAAC;AA0BZ,wBAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,GAChB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAiCzC,yBAAiB,OAAO,CAAC;IACvB,SAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,GACvB,KAAK,CAAC,CAAC,CAAC,CAAC;IACZ,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,GACvB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;IAIlC,MAAM,IAAI,2HAAe,CAAC;IAC1B,MAAM,WAAW;;KAA6B,CAAC;CACvD"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.forEach = void 0;
|
|
4
|
-
const function_1 = require("../function");
|
|
5
|
-
const reduce_lazy_1 = require("../utils/reduce-lazy");
|
|
6
|
-
const to_lazy_indexed_1 = require("../utils/to-lazy-indexed");
|
|
7
|
-
function forEach() {
|
|
8
|
-
return (0, function_1.purry)(_forEach(false), arguments, forEach.lazy);
|
|
9
|
-
}
|
|
10
|
-
exports.forEach = forEach;
|
|
11
|
-
function _forEach(indexed) {
|
|
12
|
-
return (array, fn) => {
|
|
13
|
-
return (0, reduce_lazy_1._reduceLazy)(array, indexed ? forEach.lazyIndexed(fn) : forEach.lazy(fn), indexed);
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
function _lazy(indexed) {
|
|
17
|
-
return (fn) => {
|
|
18
|
-
return (value, index, array) => {
|
|
19
|
-
if (indexed) {
|
|
20
|
-
fn(value, index, array);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
fn(value);
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
done: false,
|
|
27
|
-
hasNext: true,
|
|
28
|
-
next: value,
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
(function (forEach) {
|
|
34
|
-
function indexed() {
|
|
35
|
-
return (0, function_1.purry)(_forEach(true), arguments, forEach.lazyIndexed);
|
|
36
|
-
}
|
|
37
|
-
forEach.indexed = indexed;
|
|
38
|
-
forEach.lazy = _lazy(false);
|
|
39
|
-
forEach.lazyIndexed = (0, to_lazy_indexed_1.toLazyIndexed)(_lazy(true));
|
|
40
|
-
})(forEach || (exports.forEach = forEach = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type NonEmptyArray, type PredIndexed } from '../utils/types';
|
|
2
|
-
export declare function groupBy<T>(items: ReadonlyArray<T>, fn: (item: T) => PropertyKey | undefined): Record<PropertyKey, NonEmptyArray<T>>;
|
|
3
|
-
export declare function groupBy<T>(fn: (item: T) => PropertyKey | undefined): (array: ReadonlyArray<T>) => Record<PropertyKey, NonEmptyArray<T>>;
|
|
4
|
-
interface Strict {
|
|
5
|
-
<Value, Key extends PropertyKey = PropertyKey>(items: ReadonlyArray<Value>, fn: (item: Value) => Key | undefined): StrictOut<Value, Key>;
|
|
6
|
-
<Value, Key extends PropertyKey = PropertyKey>(fn: (item: Value) => Key | undefined): (items: ReadonlyArray<Value>) => StrictOut<Value, Key>;
|
|
7
|
-
readonly indexed: {
|
|
8
|
-
<Value, Key extends PropertyKey = PropertyKey>(items: ReadonlyArray<Value>, fn: PredIndexed<Value, Key | undefined>): StrictOut<Value, Key>;
|
|
9
|
-
<Value, Key extends PropertyKey = PropertyKey>(fn: PredIndexed<Value, Key | undefined>): (items: ReadonlyArray<Value>) => StrictOut<Value, Key>;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
type StrictOut<Value, Key extends PropertyKey = PropertyKey> = string extends Key ? Record<Key, NonEmptyArray<Value>> : number extends Key ? Record<Key, NonEmptyArray<Value>> : symbol extends Key ? Record<Key, NonEmptyArray<Value>> : Partial<Record<Key, NonEmptyArray<Value>>>;
|
|
13
|
-
export declare namespace groupBy {
|
|
14
|
-
function indexed<T>(array: ReadonlyArray<T>, fn: PredIndexed<T, PropertyKey | undefined>): Record<string, NonEmptyArray<T>>;
|
|
15
|
-
function indexed<T>(fn: PredIndexed<T, PropertyKey | undefined>): (array: ReadonlyArray<T>) => Record<string, NonEmptyArray<T>>;
|
|
16
|
-
const strict: Strict;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=group-by.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group-by.d.ts","sourceRoot":"","sources":["../../../src/array/group-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAA4B,MAAM,gBAAgB,CAAC;AAoBhG,wBAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,WAAW,GAAG,SAAS,GACvC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzC,wBAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,WAAW,GAAG,SAAS,GACvC,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAuCtE,UAAU,MAAM;IAEd,CAAC,KAAK,EAAE,GAAG,SAAS,WAAW,GAAG,WAAW,EAC3C,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,EAC3B,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,GAAG,GAAG,SAAS,GACnC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAGzB,CAAC,KAAK,EAAE,GAAG,SAAS,WAAW,GAAG,WAAW,EAC3C,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,GAAG,GAAG,SAAS,GACnC,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAE1D,QAAQ,CAAC,OAAO,EAAE;QAEhB,CAAC,KAAK,EAAE,GAAG,SAAS,WAAW,GAAG,WAAW,EAC3C,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,EAC3B,EAAE,EAAE,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS,CAAC,GACtC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAGzB,CAAC,KAAK,EAAE,GAAG,SAAS,WAAW,GAAG,WAAW,EAC3C,EAAE,EAAE,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS,CAAC,GACtC,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KAC3D,CAAC;CACH;AAQD,KAAK,SAAS,CAAC,KAAK,EAAE,GAAG,SAAS,WAAW,GAAG,WAAW,IAGzD,MAAM,SAAS,GAAG,GACd,MAAM,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,GACjC,MAAM,SAAS,GAAG,GAChB,MAAM,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,GACjC,MAAM,SAAS,GAAG,GAChB,MAAM,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,GAInC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnD,yBAAiB,OAAO,CAAC;IACvB,SAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,GAC1C,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,GAC1C,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAK1D,MAAM,MAAM,EAAE,MAAgB,CAAC;CACvC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.groupBy = void 0;
|
|
4
|
-
const function_1 = require("../function");
|
|
5
|
-
function groupBy() {
|
|
6
|
-
return (0, function_1.purry)(_groupBy(false), arguments);
|
|
7
|
-
}
|
|
8
|
-
exports.groupBy = groupBy;
|
|
9
|
-
function _groupBy(indexed) {
|
|
10
|
-
return (array, fn) => {
|
|
11
|
-
const ret = {};
|
|
12
|
-
array.forEach((item, index) => {
|
|
13
|
-
const key = indexed ? fn(item, index, array) : fn(item);
|
|
14
|
-
if (key !== undefined) {
|
|
15
|
-
const actualKey = String(key);
|
|
16
|
-
if (!ret[actualKey]) {
|
|
17
|
-
ret[actualKey] = [];
|
|
18
|
-
}
|
|
19
|
-
ret[actualKey].push(item);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
return ret;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
(function (groupBy) {
|
|
26
|
-
function indexed() {
|
|
27
|
-
return (0, function_1.purry)(_groupBy(true), arguments);
|
|
28
|
-
}
|
|
29
|
-
groupBy.indexed = indexed;
|
|
30
|
-
groupBy.strict = groupBy;
|
|
31
|
-
})(groupBy || (exports.groupBy = groupBy = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type PredIndexed } from '../utils/types';
|
|
2
|
-
export declare function indexBy<T>(array: ReadonlyArray<T>, fn: (item: T) => any): Record<string, T>;
|
|
3
|
-
export declare function indexBy<T>(fn: (item: T) => any): (array: ReadonlyArray<T>) => Record<string, T>;
|
|
4
|
-
export declare namespace indexBy {
|
|
5
|
-
function indexed<T>(array: ReadonlyArray<T>, fn: PredIndexed<T, any>): Record<string, T>;
|
|
6
|
-
function indexed<T>(fn: PredIndexed<T, any>): (array: ReadonlyArray<T>) => Record<string, T>;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=index-by.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-by.d.ts","sourceRoot":"","sources":["../../../src/array/index-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAA4B,MAAM,gBAAgB,CAAC;AAe5E,wBAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,GACnB,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAiBrB,wBAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,GACnB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAiBlD,yBAAiB,OAAO,CAAC;IACvB,SAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,CAAC,GACtB,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACrB,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,CAAC,GACtB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CAInD"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.indexBy = void 0;
|
|
4
|
-
const function_1 = require("../function");
|
|
5
|
-
function indexBy() {
|
|
6
|
-
return (0, function_1.purry)(_indexBy(false), arguments);
|
|
7
|
-
}
|
|
8
|
-
exports.indexBy = indexBy;
|
|
9
|
-
function _indexBy(indexed) {
|
|
10
|
-
return (array, fn) => {
|
|
11
|
-
return array.reduce((ret, item, index) => {
|
|
12
|
-
const value = indexed ? fn(item, index, array) : fn(item);
|
|
13
|
-
const key = String(value);
|
|
14
|
-
ret[key] = item;
|
|
15
|
-
return ret;
|
|
16
|
-
}, {});
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
(function (indexBy) {
|
|
20
|
-
function indexed() {
|
|
21
|
-
return (0, function_1.purry)(_indexBy(true), arguments);
|
|
22
|
-
}
|
|
23
|
-
indexBy.indexed = indexed;
|
|
24
|
-
})(indexBy || (exports.indexBy = indexBy = {}));
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export * from './all-pass';
|
|
2
|
-
export * from './any-pass';
|
|
3
|
-
export * from './chunk';
|
|
4
|
-
export * from './compact';
|
|
5
|
-
export * from './concat';
|
|
6
|
-
export * from './count-by';
|
|
7
|
-
export * from './difference-with';
|
|
8
|
-
export * from './difference';
|
|
9
|
-
export * from './drop-last';
|
|
10
|
-
export * from './drop';
|
|
11
|
-
export * from './filter';
|
|
12
|
-
export * from './find-index';
|
|
13
|
-
export * from './find-last-index';
|
|
14
|
-
export * from './find-last';
|
|
15
|
-
export * from './find';
|
|
16
|
-
export * from './first';
|
|
17
|
-
export * from './flat-map-to-obj';
|
|
18
|
-
export * from './flat-map';
|
|
19
|
-
export * from './flatten-deep';
|
|
20
|
-
export * from './flatten';
|
|
21
|
-
export * from './for-each';
|
|
22
|
-
export * from './group-by';
|
|
23
|
-
export * from './index-by';
|
|
24
|
-
export * from './intersection';
|
|
25
|
-
export * from './intersection-with';
|
|
26
|
-
export * from './join';
|
|
27
|
-
export * from './last';
|
|
28
|
-
export * from './length';
|
|
29
|
-
export * from './map';
|
|
30
|
-
export * from './map-to-obj';
|
|
31
|
-
export * from './max-by';
|
|
32
|
-
export * from './mean-by';
|
|
33
|
-
export * from './merge-all';
|
|
34
|
-
export * from './min-by';
|
|
35
|
-
export * from './partition';
|
|
36
|
-
export * from './range';
|
|
37
|
-
export * from './reduce';
|
|
38
|
-
export * from './reject';
|
|
39
|
-
export * from './reverse';
|
|
40
|
-
export * from './sample';
|
|
41
|
-
export * from './shuffle';
|
|
42
|
-
export * from './sort';
|
|
43
|
-
export * from './sort-by';
|
|
44
|
-
export * from './split-at';
|
|
45
|
-
export * from './split-when';
|
|
46
|
-
export * from './sum-by';
|
|
47
|
-
export * from './swap-indices';
|
|
48
|
-
export * from './take';
|
|
49
|
-
export * from './take-while';
|
|
50
|
-
export * from './uniq';
|
|
51
|
-
export * from './uniq-by';
|
|
52
|
-
export * from './uniq-with';
|
|
53
|
-
export * from './zip';
|
|
54
|
-
export * from './zip-obj';
|
|
55
|
-
export * from './zip-with';
|
|
56
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/array/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./all-pass"), exports);
|
|
18
|
-
__exportStar(require("./any-pass"), exports);
|
|
19
|
-
__exportStar(require("./chunk"), exports);
|
|
20
|
-
__exportStar(require("./compact"), exports);
|
|
21
|
-
__exportStar(require("./concat"), exports);
|
|
22
|
-
__exportStar(require("./count-by"), exports);
|
|
23
|
-
__exportStar(require("./difference-with"), exports);
|
|
24
|
-
__exportStar(require("./difference"), exports);
|
|
25
|
-
__exportStar(require("./drop-last"), exports);
|
|
26
|
-
__exportStar(require("./drop"), exports);
|
|
27
|
-
__exportStar(require("./filter"), exports);
|
|
28
|
-
__exportStar(require("./find-index"), exports);
|
|
29
|
-
__exportStar(require("./find-last-index"), exports);
|
|
30
|
-
__exportStar(require("./find-last"), exports);
|
|
31
|
-
__exportStar(require("./find"), exports);
|
|
32
|
-
__exportStar(require("./first"), exports);
|
|
33
|
-
__exportStar(require("./flat-map-to-obj"), exports);
|
|
34
|
-
__exportStar(require("./flat-map"), exports);
|
|
35
|
-
__exportStar(require("./flatten-deep"), exports);
|
|
36
|
-
__exportStar(require("./flatten"), exports);
|
|
37
|
-
__exportStar(require("./for-each"), exports);
|
|
38
|
-
__exportStar(require("./group-by"), exports);
|
|
39
|
-
__exportStar(require("./index-by"), exports);
|
|
40
|
-
__exportStar(require("./intersection"), exports);
|
|
41
|
-
__exportStar(require("./intersection-with"), exports);
|
|
42
|
-
__exportStar(require("./join"), exports);
|
|
43
|
-
__exportStar(require("./last"), exports);
|
|
44
|
-
__exportStar(require("./length"), exports);
|
|
45
|
-
__exportStar(require("./map"), exports);
|
|
46
|
-
__exportStar(require("./map-to-obj"), exports);
|
|
47
|
-
__exportStar(require("./max-by"), exports);
|
|
48
|
-
__exportStar(require("./mean-by"), exports);
|
|
49
|
-
__exportStar(require("./merge-all"), exports);
|
|
50
|
-
__exportStar(require("./min-by"), exports);
|
|
51
|
-
__exportStar(require("./partition"), exports);
|
|
52
|
-
__exportStar(require("./range"), exports);
|
|
53
|
-
__exportStar(require("./reduce"), exports);
|
|
54
|
-
__exportStar(require("./reject"), exports);
|
|
55
|
-
__exportStar(require("./reverse"), exports);
|
|
56
|
-
__exportStar(require("./sample"), exports);
|
|
57
|
-
__exportStar(require("./shuffle"), exports);
|
|
58
|
-
__exportStar(require("./sort"), exports);
|
|
59
|
-
__exportStar(require("./sort-by"), exports);
|
|
60
|
-
__exportStar(require("./split-at"), exports);
|
|
61
|
-
__exportStar(require("./split-when"), exports);
|
|
62
|
-
__exportStar(require("./sum-by"), exports);
|
|
63
|
-
__exportStar(require("./swap-indices"), exports);
|
|
64
|
-
__exportStar(require("./take"), exports);
|
|
65
|
-
__exportStar(require("./take-while"), exports);
|
|
66
|
-
__exportStar(require("./uniq"), exports);
|
|
67
|
-
__exportStar(require("./uniq-by"), exports);
|
|
68
|
-
__exportStar(require("./uniq-with"), exports);
|
|
69
|
-
__exportStar(require("./zip"), exports);
|
|
70
|
-
__exportStar(require("./zip-obj"), exports);
|
|
71
|
-
__exportStar(require("./zip-with"), exports);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type LazyResult } from '../utils/reduce-lazy';
|
|
2
|
-
type Comparator<TFirst, TSecond> = (a: TFirst, b: TSecond) => boolean;
|
|
3
|
-
export declare function intersectionWith<TFirst, TSecond>(array: ReadonlyArray<TFirst>, other: ReadonlyArray<TSecond>, comparator: Comparator<TFirst, TSecond>): Array<TFirst>;
|
|
4
|
-
export declare function intersectionWith<TFirst, TSecond>(other: ReadonlyArray<TSecond>, comparator: Comparator<TFirst, TSecond>): (array: ReadonlyArray<TFirst>) => Array<TFirst>;
|
|
5
|
-
export declare namespace intersectionWith {
|
|
6
|
-
function lazy<TFirst, TSecond>(other: Array<TSecond>, comparator: Comparator<TFirst, TSecond>): (value: TFirst) => LazyResult<TFirst>;
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=intersection-with.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intersection-with.d.ts","sourceRoot":"","sources":["../../../src/array/intersection-with.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,KAAK,UAAU,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;AAuBtE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAC9C,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAC5B,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAC7B,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GACtC,KAAK,CAAC,MAAM,CAAC,CAAC;AAqBjB,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAC9C,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAK7B,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GACtC,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,CAAC;AAenD,yBAAiB,gBAAgB,CAAC;IAChC,SAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,EAClC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,WAExB,MAAM,KAAG,WAAW,MAAM,CAAC,CAa3C;CACF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.intersectionWith = void 0;
|
|
4
|
-
const reduce_lazy_1 = require("../utils/reduce-lazy");
|
|
5
|
-
const function_1 = require("../function");
|
|
6
|
-
function intersectionWith() {
|
|
7
|
-
return (0, function_1.purry)(_intersectionWith, arguments, intersectionWith.lazy);
|
|
8
|
-
}
|
|
9
|
-
exports.intersectionWith = intersectionWith;
|
|
10
|
-
function _intersectionWith(array, other, comparator) {
|
|
11
|
-
const lazy = intersectionWith.lazy(other, comparator);
|
|
12
|
-
return (0, reduce_lazy_1._reduceLazy)(array, lazy);
|
|
13
|
-
}
|
|
14
|
-
(function (intersectionWith) {
|
|
15
|
-
function lazy(other, comparator) {
|
|
16
|
-
return (value) => {
|
|
17
|
-
if (other.some((otherValue) => comparator(value, otherValue))) {
|
|
18
|
-
return {
|
|
19
|
-
done: false,
|
|
20
|
-
hasNext: true,
|
|
21
|
-
next: value,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
done: false,
|
|
26
|
-
hasNext: false,
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
intersectionWith.lazy = lazy;
|
|
31
|
-
})(intersectionWith || (exports.intersectionWith = intersectionWith = {}));
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type LazyResult } from '../utils/reduce-lazy';
|
|
2
|
-
export declare function intersection<T>(source: ReadonlyArray<T>, other: ReadonlyArray<T>): Array<T>;
|
|
3
|
-
export declare function intersection<T, K>(other: ReadonlyArray<T>): (source: ReadonlyArray<K>) => Array<T>;
|
|
4
|
-
export declare namespace intersection {
|
|
5
|
-
function lazy<T>(other: Array<T>): (value: T) => LazyResult<T>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=intersection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intersection.d.ts","sourceRoot":"","sources":["../../../src/array/intersection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAgBvD,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EACxB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,KAAK,CAAC,CAAC,CAAC,CAAC;AAcZ,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAW1C,yBAAiB,YAAY,CAAC;IAC5B,SAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,WACtB,CAAC,KAAG,WAAW,CAAC,CAAC,CAcjC;CACF"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.intersection = void 0;
|
|
4
|
-
const function_1 = require("../function");
|
|
5
|
-
const reduce_lazy_1 = require("../utils/reduce-lazy");
|
|
6
|
-
function intersection() {
|
|
7
|
-
return (0, function_1.purry)(_intersection, arguments, intersection.lazy);
|
|
8
|
-
}
|
|
9
|
-
exports.intersection = intersection;
|
|
10
|
-
function _intersection(array, other) {
|
|
11
|
-
const lazy = intersection.lazy(other);
|
|
12
|
-
return (0, reduce_lazy_1._reduceLazy)(array, lazy);
|
|
13
|
-
}
|
|
14
|
-
(function (intersection) {
|
|
15
|
-
function lazy(other) {
|
|
16
|
-
return (value) => {
|
|
17
|
-
const set = new Set(other);
|
|
18
|
-
if (set.has(value)) {
|
|
19
|
-
return {
|
|
20
|
-
done: false,
|
|
21
|
-
hasNext: true,
|
|
22
|
-
next: value,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
done: false,
|
|
27
|
-
hasNext: false,
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
intersection.lazy = lazy;
|
|
32
|
-
})(intersection || (exports.intersection = intersection = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type IterableContainer } from '../utils/types';
|
|
2
|
-
type Joinable = bigint | boolean | number | string | null | undefined;
|
|
3
|
-
export type Joined<T extends IterableContainer, Glue extends string> = T[number] extends never ? '' : T extends readonly [Joinable?] ? `${NullishCoalesce<T[0], ''>}` : T extends readonly [infer First, ...infer Tail] ? `${NullishCoalesce<First, ''>}${Glue}${Joined<Tail, Glue>}` : T extends readonly [...infer Head, infer Last] ? `${Joined<Head, Glue>}${Glue}${NullishCoalesce<Last, ''>}` : string;
|
|
4
|
-
type NullishCoalesce<T, Fallback> = T extends Joinable ? T extends undefined | null ? NonNullable<T> | Fallback : T : never;
|
|
5
|
-
export declare function join<T extends ReadonlyArray<Joinable> | [], Glue extends string>(data: T, glue: Glue): Joined<T, Glue>;
|
|
6
|
-
export declare function join<T extends ReadonlyArray<Joinable> | [], Glue extends string>(glue: Glue): (data: T) => Joined<T, Glue>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=join.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../src/array/join.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,KAAK,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAEtE,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,iBAAiB,EAAE,IAAI,SAAS,MAAM,IAEjE,CAAC,CAAC,MAAM,CAAC,SAAS,KAAK,GACnB,EAAE,GAEJ,CAAC,SAAS,SAAS,CAAC,QAAQ,CAAC,CAAC,GAC1B,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,GAEhC,CAAC,SAAS,SAAS,CAAC,MAAM,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,GAC3C,GAAG,eAAe,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAE7D,CAAC,SAAS,SAAS,CAAC,GAAG,MAAM,IAAI,EAAE,MAAM,IAAI,CAAC,GAC1C,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,GAAG,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,GAE5D,MAAM,CAAC;AAMjB,KAAK,eAAe,CAAC,CAAC,EAAE,QAAQ,IAAI,CAAC,SAAS,QAAQ,GAClD,CAAC,SAAS,SAAS,GAAG,IAAI,GACxB,WAAW,CAAC,CAAC,CAAC,GAAG,QAAQ,GACzB,CAAC,GACH,KAAK,CAAC;AAqBV,wBAAgB,IAAI,CAClB,CAAC,SAAS,aAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,EACtC,IAAI,SAAS,MAAM,EACnB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AAqBxC,wBAAgB,IAAI,CAClB,CAAC,SAAS,aAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,EACtC,IAAI,SAAS,MAAM,EACnB,IAAI,EAAE,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.join = void 0;
|
|
4
|
-
const function_1 = require("../function");
|
|
5
|
-
function join() {
|
|
6
|
-
return (0, function_1.purry)(joinImplementation, arguments);
|
|
7
|
-
}
|
|
8
|
-
exports.join = join;
|
|
9
|
-
function joinImplementation(data, glue) {
|
|
10
|
-
return data.join(glue);
|
|
11
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type NonEmptyArray } from '../utils/types';
|
|
2
|
-
export declare function last<T>(array: NonEmptyArray<T>): T;
|
|
3
|
-
export declare function last<T>(array: ReadonlyArray<T>): T | undefined;
|
|
4
|
-
export declare function last<T>(): (array: ReadonlyArray<T>) => T | undefined;
|
|
5
|
-
//# sourceMappingURL=last.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"last.d.ts","sourceRoot":"","sources":["../../../src/array/last.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAsBpD,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACpD,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;AAChE,wBAAgB,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.last = void 0;
|
|
4
|
-
const function_1 = require("../function");
|
|
5
|
-
function last() {
|
|
6
|
-
return (0, function_1.purry)(_last, arguments);
|
|
7
|
-
}
|
|
8
|
-
exports.last = last;
|
|
9
|
-
function _last(array) {
|
|
10
|
-
return array[array.length - 1];
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"length.d.ts","sourceRoot":"","sources":["../../../src/array/length.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AAWhD,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AACxD,wBAAgB,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.length = void 0;
|
|
4
|
-
const function_1 = require("../function");
|
|
5
|
-
function length() {
|
|
6
|
-
return (0, function_1.purry)(_length, arguments);
|
|
7
|
-
}
|
|
8
|
-
exports.length = length;
|
|
9
|
-
function _length(items) {
|
|
10
|
-
return 'length' in items ? items.length : Array.from(items).length;
|
|
11
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function mapToObj<T, K extends keyof any, V>(array: ReadonlyArray<T>, fn: (element: T) => [K, V]): Record<K, V>;
|
|
2
|
-
export declare function mapToObj<T, K extends keyof any, V>(fn: (element: T) => [K, V]): (array: ReadonlyArray<T>) => Record<K, V>;
|
|
3
|
-
export declare namespace mapToObj {
|
|
4
|
-
function indexed<T, K extends keyof any, V>(array: ReadonlyArray<T>, fn: (element: T, index: number, array: ReadonlyArray<T>) => [K, V]): Record<K, V>;
|
|
5
|
-
function indexed<T, K extends keyof any, V>(fn: (element: T, index: number, array: ReadonlyArray<T>) => [K, V]): (array: ReadonlyArray<T>) => Record<K, V>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=map-to-obj.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-to-obj.d.ts","sourceRoot":"","sources":["../../../src/array/map-to-obj.ts"],"names":[],"mappings":"AAkBA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,EAChD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GACzB,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAsBhB,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,EAChD,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GACzB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAgB7C,yBAAiB,QAAQ,CAAC;IACxB,SAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,EAC/C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GACjE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAChB,SAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,EAC/C,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GACjE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAI9C"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapToObj = void 0;
|
|
4
|
-
const function_1 = require("../function");
|
|
5
|
-
function mapToObj() {
|
|
6
|
-
return (0, function_1.purry)(_mapToObj(false), arguments);
|
|
7
|
-
}
|
|
8
|
-
exports.mapToObj = mapToObj;
|
|
9
|
-
function _mapToObj(indexed) {
|
|
10
|
-
return (array, fn) => {
|
|
11
|
-
return array.reduce((result, element, index) => {
|
|
12
|
-
const [key, value] = indexed ? fn(element, index, array) : fn(element);
|
|
13
|
-
result[key] = value;
|
|
14
|
-
return result;
|
|
15
|
-
}, {});
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
(function (mapToObj) {
|
|
19
|
-
function indexed() {
|
|
20
|
-
return (0, function_1.purry)(_mapToObj(true), arguments);
|
|
21
|
-
}
|
|
22
|
-
mapToObj.indexed = indexed;
|
|
23
|
-
})(mapToObj || (exports.mapToObj = mapToObj = {}));
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type LazyResult } from '../utils/reduce-lazy';
|
|
2
|
-
import { type IterableContainer, type Pred, type PredIndexed, type PredIndexedOptional } from '../utils/types';
|
|
3
|
-
export declare function map<T, K>(array: ReadonlyArray<T>, fn: Pred<T, K>): Array<K>;
|
|
4
|
-
export declare function map<T, K>(fn: Pred<T, K>): (array: ReadonlyArray<T>) => Array<K>;
|
|
5
|
-
interface Strict {
|
|
6
|
-
<T extends IterableContainer, K>(items: T, mapper: Pred<T[number], K>): StrictOut<T, K>;
|
|
7
|
-
<T extends IterableContainer, K>(mapper: Pred<T[number], K>): (items: T) => StrictOut<T, K>;
|
|
8
|
-
readonly indexed: {
|
|
9
|
-
<T extends IterableContainer, K>(items: T, mapper: PredIndexed<T[number], K>): StrictOut<T, K>;
|
|
10
|
-
<T extends IterableContainer, K>(mapper: PredIndexed<T[number], K>): (items: T) => StrictOut<T, K>;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
type StrictOut<T extends IterableContainer, K> = {
|
|
14
|
-
-readonly [P in keyof T]: K;
|
|
15
|
-
};
|
|
16
|
-
export declare namespace map {
|
|
17
|
-
function indexed<T, K>(array: ReadonlyArray<T>, fn: PredIndexed<T, K>): Array<K>;
|
|
18
|
-
function indexed<T, K>(fn: PredIndexed<T, K>): (array: ReadonlyArray<T>) => Array<K>;
|
|
19
|
-
const lazy: <T, K>(fn: PredIndexedOptional<T, K>) => (value: T, index?: number | undefined, array?: T[] | undefined) => LazyResult<K>;
|
|
20
|
-
const lazyIndexed: (<T, K>(fn: PredIndexedOptional<T, K>) => (value: T, index?: number | undefined, array?: T[] | undefined) => LazyResult<K>) & {
|
|
21
|
-
indexed: true;
|
|
22
|
-
};
|
|
23
|
-
const strict: Strict;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=map.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../src/array/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAC;AAwBxB,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAgB7E,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EACtB,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACb,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AA8BzC,UAAU,MAAM;IACd,CAAC,CAAC,SAAS,iBAAiB,EAAE,CAAC,EAC7B,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,GACzB,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEnB,CAAC,CAAC,SAAS,iBAAiB,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,CAC5D,KAAK,EAAE,CAAC,KACL,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAErB,QAAQ,CAAC,OAAO,EAAE;QAChB,CAAC,CAAC,SAAS,iBAAiB,EAAE,CAAC,EAC7B,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,GAChC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAEnB,CAAC,CAAC,SAAS,iBAAiB,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,CACnE,KAAK,EAAE,CAAC,KACL,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACtB,CAAC;CACH;AAED,KAAK,SAAS,CAAC,CAAC,SAAS,iBAAiB,EAAE,CAAC,IAAI;IAC/C,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC;CAC5B,CAAC;AAEF,yBAAiB,GAAG,CAAC;IACnB,SAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAC1B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GACpB,KAAK,CAAC,CAAC,CAAC,CAAC;IACZ,SAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAC1B,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GACpB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;IAKlC,MAAM,IAAI,2HAAe,CAAC;IAC1B,MAAM,WAAW;;KAA6B,CAAC;IAE/C,MAAM,MAAM,EAAE,MAAY,CAAC;CACnC"}
|