@vinicunca/perkakas 0.4.0 → 0.4.3
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 +2375 -0
- package/dist/index.d.cts +4603 -0
- package/dist/index.d.mts +4603 -0
- package/dist/index.d.ts +4603 -0
- package/dist/index.mjs +2231 -0
- package/dist/metadata.json +6 -6
- package/package.json +17 -7
- package/dist/commonjs/aria/index.js +0 -17
- package/dist/commonjs/aria/key-codes.js +0 -25
- package/dist/commonjs/array/all-pass.js +0 -11
- package/dist/commonjs/array/any-pass.js +0 -11
- package/dist/commonjs/array/chunk.js +0 -17
- package/dist/commonjs/array/concat.js +0 -11
- package/dist/commonjs/array/difference-with.js +0 -21
- package/dist/commonjs/array/drop-first-by.js +0 -26
- package/dist/commonjs/array/drop-last-while.js +0 -16
- package/dist/commonjs/array/drop-last.js +0 -15
- package/dist/commonjs/array/drop-while.js +0 -16
- package/dist/commonjs/array/drop.js +0 -25
- package/dist/commonjs/array/filter.js +0 -28
- package/dist/commonjs/array/find-index.js +0 -33
- package/dist/commonjs/array/find-last-index.js +0 -24
- package/dist/commonjs/array/find-last.js +0 -24
- package/dist/commonjs/array/find.js +0 -26
- package/dist/commonjs/array/first-by.js +0 -22
- package/dist/commonjs/array/first.js +0 -20
- package/dist/commonjs/array/flat-map-to-obj.js +0 -26
- package/dist/commonjs/array/flat-map.js +0 -23
- package/dist/commonjs/array/flatten-deep.js +0 -38
- package/dist/commonjs/array/flatten.js +0 -20
- package/dist/commonjs/array/for-each.js +0 -36
- package/dist/commonjs/array/group-by.js +0 -33
- package/dist/commonjs/array/has-at-least.js +0 -11
- package/dist/commonjs/array/index-by.js +0 -37
- package/dist/commonjs/array/index.js +0 -81
- package/dist/commonjs/array/intersection-with.js +0 -21
- package/dist/commonjs/array/join.js +0 -11
- package/dist/commonjs/array/last.js +0 -11
- package/dist/commonjs/array/length.js +0 -11
- package/dist/commonjs/array/map-to-obj.js +0 -24
- package/dist/commonjs/array/map.js +0 -31
- package/dist/commonjs/array/max-by.js +0 -28
- package/dist/commonjs/array/mean-by.js +0 -26
- package/dist/commonjs/array/merge-all.js +0 -11
- package/dist/commonjs/array/min-by.js +0 -28
- package/dist/commonjs/array/nth-by.js +0 -12
- package/dist/commonjs/array/only.js +0 -11
- package/dist/commonjs/array/partition.js +0 -24
- package/dist/commonjs/array/range.js +0 -15
- package/dist/commonjs/array/rank-by.js +0 -17
- package/dist/commonjs/array/reduce.js +0 -19
- package/dist/commonjs/array/reject.js +0 -28
- package/dist/commonjs/array/reverse.js +0 -11
- package/dist/commonjs/array/sample.js +0 -34
- package/dist/commonjs/array/shuffle.js +0 -18
- package/dist/commonjs/array/sort-by.js +0 -14
- package/dist/commonjs/array/sort.js +0 -16
- package/dist/commonjs/array/sorted-index-by.js +0 -19
- package/dist/commonjs/array/sorted-index-with.js +0 -15
- package/dist/commonjs/array/sorted-index.js +0 -12
- package/dist/commonjs/array/sorted-last-index-by.js +0 -19
- package/dist/commonjs/array/sorted-last-index.js +0 -12
- package/dist/commonjs/array/splice.js +0 -13
- package/dist/commonjs/array/split-at.js +0 -13
- package/dist/commonjs/array/split-when.js +0 -17
- package/dist/commonjs/array/sum-by.js +0 -24
- package/dist/commonjs/array/swap-indices.js +0 -34
- package/dist/commonjs/array/take-first-by.js +0 -24
- package/dist/commonjs/array/take-while.js +0 -18
- package/dist/commonjs/array/take.js +0 -25
- package/dist/commonjs/array/uniq-by.js +0 -23
- package/dist/commonjs/array/uniq-with.js +0 -23
- package/dist/commonjs/array/uniq.js +0 -25
- package/dist/commonjs/array/zip-obj.js +0 -16
- package/dist/commonjs/array/zip-with.js +0 -23
- package/dist/commonjs/array/zip.js +0 -19
- package/dist/commonjs/function/conditional.js +0 -34
- package/dist/commonjs/function/create-pipe.js +0 -8
- package/dist/commonjs/function/debounce.js +0 -88
- package/dist/commonjs/function/identity.js +0 -7
- package/dist/commonjs/function/index.js +0 -26
- package/dist/commonjs/function/noop.js +0 -7
- package/dist/commonjs/function/once.js +0 -15
- package/dist/commonjs/function/pipe.js +0 -100
- package/dist/commonjs/function/purry.js +0 -19
- package/dist/commonjs/function/sleep.js +0 -9
- package/dist/commonjs/function/times.js +0 -18
- package/dist/commonjs/guard/has-sub-object.js +0 -19
- package/dist/commonjs/guard/index.js +0 -35
- package/dist/commonjs/guard/is-array.js +0 -7
- package/dist/commonjs/guard/is-boolean.js +0 -7
- package/dist/commonjs/guard/is-date.js +0 -7
- package/dist/commonjs/guard/is-deep-equal.js +0 -55
- package/dist/commonjs/guard/is-defined.js +0 -13
- package/dist/commonjs/guard/is-empty.js +0 -19
- package/dist/commonjs/guard/is-error.js +0 -7
- package/dist/commonjs/guard/is-function.js +0 -7
- package/dist/commonjs/guard/is-included-in.js +0 -11
- package/dist/commonjs/guard/is-nil.js +0 -7
- package/dist/commonjs/guard/is-non-null.js +0 -7
- package/dist/commonjs/guard/is-not.js +0 -7
- package/dist/commonjs/guard/is-number.js +0 -7
- package/dist/commonjs/guard/is-object.js +0 -11
- package/dist/commonjs/guard/is-promise.js +0 -7
- package/dist/commonjs/guard/is-string.js +0 -7
- package/dist/commonjs/guard/is-symbol.js +0 -7
- package/dist/commonjs/guard/is-truthy.js +0 -7
- package/dist/commonjs/index.js +0 -26
- package/dist/commonjs/number/add.js +0 -11
- package/dist/commonjs/number/ceil.js +0 -9
- package/dist/commonjs/number/clamp.js +0 -17
- package/dist/commonjs/number/divide.js +0 -11
- package/dist/commonjs/number/floor.js +0 -9
- package/dist/commonjs/number/index.js +0 -24
- package/dist/commonjs/number/multiply.js +0 -11
- package/dist/commonjs/number/round.js +0 -9
- package/dist/commonjs/number/subtract.js +0 -11
- package/dist/commonjs/object/add-prop.js +0 -14
- package/dist/commonjs/object/clone.js +0 -49
- package/dist/commonjs/object/for-each-obj.js +0 -30
- package/dist/commonjs/object/from-keys.js +0 -15
- package/dist/commonjs/object/from-pairs.js +0 -18
- package/dist/commonjs/object/index.js +0 -39
- package/dist/commonjs/object/invert.js +0 -17
- package/dist/commonjs/object/keys.js +0 -11
- package/dist/commonjs/object/map-keys.js +0 -16
- package/dist/commonjs/object/map-values.js +0 -16
- package/dist/commonjs/object/merge-deep.js +0 -31
- package/dist/commonjs/object/merge.js +0 -11
- package/dist/commonjs/object/omit-by.js +0 -22
- package/dist/commonjs/object/omit.js +0 -25
- package/dist/commonjs/object/path-or.js +0 -18
- package/dist/commonjs/object/pick-by.js +0 -22
- package/dist/commonjs/object/pick.js +0 -17
- package/dist/commonjs/object/prop.js +0 -7
- package/dist/commonjs/object/set-path.js +0 -25
- package/dist/commonjs/object/set.js +0 -14
- package/dist/commonjs/object/swap-props.js +0 -16
- package/dist/commonjs/object/to-pairs.js +0 -11
- package/dist/commonjs/object/values.js +0 -7
- package/dist/commonjs/string/cases-types.js +0 -2
- package/dist/commonjs/string/cases.js +0 -107
- package/dist/commonjs/string/human-readable-file-size.js +0 -16
- package/dist/commonjs/string/index.js +0 -21
- package/dist/commonjs/string/random-string.js +0 -16
- package/dist/commonjs/string/slugify.js +0 -13
- package/dist/commonjs/string/string-to-path.js +0 -18
- package/dist/commonjs/type/index.js +0 -17
- package/dist/commonjs/type/type.js +0 -13
- package/dist/commonjs/utils/binary-search-cutoff-index.js +0 -19
- package/dist/commonjs/utils/heap.js +0 -43
- package/dist/commonjs/utils/narrow.js +0 -2
- package/dist/commonjs/utils/paths.js +0 -2
- package/dist/commonjs/utils/purry-on.js +0 -10
- package/dist/commonjs/utils/purry-order-rules.js +0 -66
- package/dist/commonjs/utils/quick-select.js +0 -31
- package/dist/commonjs/utils/reduce-lazy.js +0 -21
- package/dist/commonjs/utils/swap-in-place.js +0 -7
- package/dist/commonjs/utils/to-lazy-indexed.js +0 -7
- package/dist/commonjs/utils/to-single.js +0 -7
- package/dist/commonjs/utils/types.js +0 -2
- package/dist/commonjs/utils/with-precision.js +0 -23
- package/dist/es/aria/index.js +0 -1
- package/dist/es/aria/key-codes.js +0 -22
- package/dist/es/array/all-pass.js +0 -7
- package/dist/es/array/any-pass.js +0 -7
- package/dist/es/array/chunk.js +0 -13
- package/dist/es/array/concat.js +0 -7
- package/dist/es/array/difference-with.js +0 -17
- package/dist/es/array/drop-first-by.js +0 -22
- package/dist/es/array/drop-last-while.js +0 -12
- package/dist/es/array/drop-last.js +0 -11
- package/dist/es/array/drop-while.js +0 -12
- package/dist/es/array/drop.js +0 -21
- package/dist/es/array/filter.js +0 -24
- package/dist/es/array/find-index.js +0 -29
- package/dist/es/array/find-last-index.js +0 -20
- package/dist/es/array/find-last.js +0 -20
- package/dist/es/array/find.js +0 -22
- package/dist/es/array/first-by.js +0 -18
- package/dist/es/array/first.js +0 -16
- package/dist/es/array/flat-map-to-obj.js +0 -22
- package/dist/es/array/flat-map.js +0 -19
- package/dist/es/array/flatten-deep.js +0 -34
- package/dist/es/array/flatten.js +0 -16
- package/dist/es/array/for-each.js +0 -32
- package/dist/es/array/group-by.js +0 -29
- package/dist/es/array/has-at-least.js +0 -7
- package/dist/es/array/index-by.js +0 -33
- package/dist/es/array/index.js +0 -65
- package/dist/es/array/intersection-with.js +0 -17
- package/dist/es/array/join.js +0 -7
- package/dist/es/array/last.js +0 -7
- package/dist/es/array/length.js +0 -7
- package/dist/es/array/map-to-obj.js +0 -20
- package/dist/es/array/map.js +0 -27
- package/dist/es/array/max-by.js +0 -24
- package/dist/es/array/mean-by.js +0 -22
- package/dist/es/array/merge-all.js +0 -7
- package/dist/es/array/min-by.js +0 -24
- package/dist/es/array/nth-by.js +0 -8
- package/dist/es/array/only.js +0 -7
- package/dist/es/array/partition.js +0 -20
- package/dist/es/array/range.js +0 -11
- package/dist/es/array/rank-by.js +0 -13
- package/dist/es/array/reduce.js +0 -15
- package/dist/es/array/reject.js +0 -24
- package/dist/es/array/reverse.js +0 -7
- package/dist/es/array/sample.js +0 -30
- package/dist/es/array/shuffle.js +0 -14
- package/dist/es/array/sort-by.js +0 -10
- package/dist/es/array/sort.js +0 -12
- package/dist/es/array/sorted-index-by.js +0 -15
- package/dist/es/array/sorted-index-with.js +0 -11
- package/dist/es/array/sorted-index.js +0 -8
- package/dist/es/array/sorted-last-index-by.js +0 -15
- package/dist/es/array/sorted-last-index.js +0 -8
- package/dist/es/array/splice.js +0 -9
- package/dist/es/array/split-at.js +0 -9
- package/dist/es/array/split-when.js +0 -13
- package/dist/es/array/sum-by.js +0 -20
- package/dist/es/array/swap-indices.js +0 -30
- package/dist/es/array/take-first-by.js +0 -20
- package/dist/es/array/take-while.js +0 -14
- package/dist/es/array/take.js +0 -21
- package/dist/es/array/uniq-by.js +0 -19
- package/dist/es/array/uniq-with.js +0 -19
- package/dist/es/array/uniq.js +0 -21
- package/dist/es/array/zip-obj.js +0 -12
- package/dist/es/array/zip-with.js +0 -19
- package/dist/es/array/zip.js +0 -15
- package/dist/es/function/conditional.js +0 -30
- package/dist/es/function/create-pipe.js +0 -4
- package/dist/es/function/debounce.js +0 -84
- package/dist/es/function/identity.js +0 -3
- package/dist/es/function/index.js +0 -10
- package/dist/es/function/noop.js +0 -3
- package/dist/es/function/once.js +0 -11
- package/dist/es/function/pipe.js +0 -96
- package/dist/es/function/purry.js +0 -15
- package/dist/es/function/sleep.js +0 -5
- package/dist/es/function/times.js +0 -14
- package/dist/es/guard/has-sub-object.js +0 -15
- package/dist/es/guard/index.js +0 -19
- package/dist/es/guard/is-array.js +0 -3
- package/dist/es/guard/is-boolean.js +0 -3
- package/dist/es/guard/is-date.js +0 -3
- package/dist/es/guard/is-deep-equal.js +0 -51
- package/dist/es/guard/is-defined.js +0 -9
- package/dist/es/guard/is-empty.js +0 -15
- package/dist/es/guard/is-error.js +0 -3
- package/dist/es/guard/is-function.js +0 -3
- package/dist/es/guard/is-included-in.js +0 -7
- package/dist/es/guard/is-nil.js +0 -3
- package/dist/es/guard/is-non-null.js +0 -3
- package/dist/es/guard/is-not.js +0 -3
- package/dist/es/guard/is-number.js +0 -3
- package/dist/es/guard/is-object.js +0 -7
- package/dist/es/guard/is-promise.js +0 -3
- package/dist/es/guard/is-string.js +0 -3
- package/dist/es/guard/is-symbol.js +0 -3
- package/dist/es/guard/is-truthy.js +0 -3
- package/dist/es/index.js +0 -9
- package/dist/es/number/add.js +0 -7
- package/dist/es/number/ceil.js +0 -5
- package/dist/es/number/clamp.js +0 -13
- package/dist/es/number/divide.js +0 -7
- package/dist/es/number/floor.js +0 -5
- package/dist/es/number/index.js +0 -8
- package/dist/es/number/multiply.js +0 -7
- package/dist/es/number/round.js +0 -5
- package/dist/es/number/subtract.js +0 -7
- package/dist/es/object/add-prop.js +0 -10
- package/dist/es/object/clone.js +0 -45
- package/dist/es/object/for-each-obj.js +0 -26
- package/dist/es/object/from-keys.js +0 -11
- package/dist/es/object/from-pairs.js +0 -14
- package/dist/es/object/index.js +0 -23
- package/dist/es/object/invert.js +0 -13
- package/dist/es/object/keys.js +0 -7
- package/dist/es/object/map-keys.js +0 -12
- package/dist/es/object/map-values.js +0 -12
- package/dist/es/object/merge-deep.js +0 -27
- package/dist/es/object/merge.js +0 -7
- package/dist/es/object/omit-by.js +0 -18
- package/dist/es/object/omit.js +0 -21
- package/dist/es/object/path-or.js +0 -14
- package/dist/es/object/pick-by.js +0 -18
- package/dist/es/object/pick.js +0 -13
- package/dist/es/object/prop.js +0 -3
- package/dist/es/object/set-path.js +0 -20
- package/dist/es/object/set.js +0 -10
- package/dist/es/object/swap-props.js +0 -12
- package/dist/es/object/to-pairs.js +0 -7
- package/dist/es/object/values.js +0 -3
- package/dist/es/string/cases-types.js +0 -1
- package/dist/es/string/cases.js +0 -93
- package/dist/es/string/human-readable-file-size.js +0 -12
- package/dist/es/string/index.js +0 -5
- package/dist/es/string/random-string.js +0 -12
- package/dist/es/string/slugify.js +0 -9
- package/dist/es/string/string-to-path.js +0 -14
- package/dist/es/type/index.js +0 -1
- package/dist/es/type/type.js +0 -9
- package/dist/es/utils/binary-search-cutoff-index.js +0 -15
- package/dist/es/utils/heap.js +0 -38
- package/dist/es/utils/narrow.js +0 -1
- package/dist/es/utils/paths.js +0 -1
- package/dist/es/utils/purry-on.js +0 -6
- package/dist/es/utils/purry-order-rules.js +0 -61
- package/dist/es/utils/quick-select.js +0 -27
- package/dist/es/utils/reduce-lazy.js +0 -17
- package/dist/es/utils/swap-in-place.js +0 -3
- package/dist/es/utils/to-lazy-indexed.js +0 -3
- package/dist/es/utils/to-single.js +0 -3
- package/dist/es/utils/types.js +0 -1
- package/dist/es/utils/with-precision.js +0 -19
- package/dist/types/aria/index.d.ts +0 -2
- package/dist/types/aria/index.d.ts.map +0 -1
- package/dist/types/aria/key-codes.d.ts +0 -26
- package/dist/types/aria/key-codes.d.ts.map +0 -1
- package/dist/types/array/all-pass.d.ts +0 -32
- package/dist/types/array/all-pass.d.ts.map +0 -1
- package/dist/types/array/any-pass.d.ts +0 -32
- package/dist/types/array/any-pass.d.ts.map +0 -1
- package/dist/types/array/chunk.d.ts +0 -29
- package/dist/types/array/chunk.d.ts.map +0 -1
- package/dist/types/array/concat.d.ts +0 -24
- package/dist/types/array/concat.d.ts.map +0 -1
- package/dist/types/array/difference-with.d.ts +0 -48
- package/dist/types/array/difference-with.d.ts.map +0 -1
- package/dist/types/array/drop-first-by.d.ts +0 -38
- package/dist/types/array/drop-first-by.d.ts.map +0 -1
- package/dist/types/array/drop-last-while.d.ts +0 -30
- package/dist/types/array/drop-last-while.d.ts.map +0 -1
- package/dist/types/array/drop-last.d.ts +0 -26
- package/dist/types/array/drop-last.d.ts.map +0 -1
- package/dist/types/array/drop-while.d.ts +0 -33
- package/dist/types/array/drop-while.d.ts.map +0 -1
- package/dist/types/array/drop.d.ts +0 -32
- package/dist/types/array/drop.d.ts.map +0 -1
- package/dist/types/array/filter.d.ts +0 -63
- package/dist/types/array/filter.d.ts.map +0 -1
- package/dist/types/array/find-index.d.ts +0 -54
- package/dist/types/array/find-index.d.ts.map +0 -1
- package/dist/types/array/find-last-index.d.ts +0 -45
- package/dist/types/array/find-last-index.d.ts.map +0 -1
- package/dist/types/array/find-last.d.ts +0 -45
- package/dist/types/array/find-last.d.ts.map +0 -1
- package/dist/types/array/find.d.ts +0 -52
- package/dist/types/array/find.d.ts.map +0 -1
- package/dist/types/array/first-by.d.ts +0 -56
- package/dist/types/array/first-by.d.ts.map +0 -1
- package/dist/types/array/first.d.ts +0 -32
- package/dist/types/array/first.d.ts.map +0 -1
- package/dist/types/array/flat-map-to-obj.d.ts +0 -50
- package/dist/types/array/flat-map-to-obj.d.ts.map +0 -1
- package/dist/types/array/flat-map.d.ts +0 -32
- package/dist/types/array/flat-map.d.ts.map +0 -1
- package/dist/types/array/flatten-deep.d.ts +0 -37
- package/dist/types/array/flatten-deep.d.ts.map +0 -1
- package/dist/types/array/flatten.d.ts +0 -39
- package/dist/types/array/flatten.d.ts.map +0 -1
- package/dist/types/array/for-each.d.ts +0 -57
- package/dist/types/array/for-each.d.ts.map +0 -1
- package/dist/types/array/group-by.d.ts +0 -37
- package/dist/types/array/group-by.d.ts.map +0 -1
- package/dist/types/array/has-at-least.d.ts +0 -46
- package/dist/types/array/has-at-least.d.ts.map +0 -1
- package/dist/types/array/index-by.d.ts +0 -52
- package/dist/types/array/index-by.d.ts.map +0 -1
- package/dist/types/array/index.d.ts +0 -66
- package/dist/types/array/index.d.ts.map +0 -1
- package/dist/types/array/intersection-with.d.ts +0 -54
- package/dist/types/array/intersection-with.d.ts.map +0 -1
- package/dist/types/array/join.d.ts +0 -45
- package/dist/types/array/join.d.ts.map +0 -1
- package/dist/types/array/last.d.ts +0 -34
- package/dist/types/array/last.d.ts.map +0 -1
- package/dist/types/array/length.d.ts +0 -15
- package/dist/types/array/length.d.ts.map +0 -1
- package/dist/types/array/map-to-obj.d.ts +0 -42
- package/dist/types/array/map-to-obj.d.ts.map +0 -1
- package/dist/types/array/map.d.ts +0 -62
- package/dist/types/array/map.d.ts.map +0 -1
- package/dist/types/array/max-by.d.ts +0 -39
- package/dist/types/array/max-by.d.ts.map +0 -1
- package/dist/types/array/mean-by.d.ts +0 -39
- package/dist/types/array/mean-by.d.ts.map +0 -1
- package/dist/types/array/merge-all.d.ts +0 -16
- package/dist/types/array/merge-all.d.ts.map +0 -1
- package/dist/types/array/min-by.d.ts +0 -39
- package/dist/types/array/min-by.d.ts.map +0 -1
- package/dist/types/array/nth-by.d.ts +0 -44
- package/dist/types/array/nth-by.d.ts.map +0 -1
- package/dist/types/array/only.d.ts +0 -37
- package/dist/types/array/only.d.ts.map +0 -1
- package/dist/types/array/partition.d.ts +0 -60
- package/dist/types/array/partition.d.ts.map +0 -1
- package/dist/types/array/range.d.ts +0 -22
- package/dist/types/array/range.d.ts.map +0 -1
- package/dist/types/array/rank-by.d.ts +0 -40
- package/dist/types/array/rank-by.d.ts.map +0 -1
- package/dist/types/array/reduce.d.ts +0 -37
- package/dist/types/array/reduce.d.ts.map +0 -1
- package/dist/types/array/reject.d.ts +0 -42
- package/dist/types/array/reject.d.ts.map +0 -1
- package/dist/types/array/reverse.d.ts +0 -27
- package/dist/types/array/reverse.d.ts.map +0 -1
- package/dist/types/array/sample.d.ts +0 -54
- package/dist/types/array/sample.d.ts.map +0 -1
- package/dist/types/array/shuffle.d.ts +0 -22
- package/dist/types/array/shuffle.d.ts.map +0 -1
- package/dist/types/array/sort-by.d.ts +0 -98
- package/dist/types/array/sort-by.d.ts.map +0 -1
- package/dist/types/array/sort.d.ts +0 -52
- package/dist/types/array/sort.d.ts.map +0 -1
- package/dist/types/array/sorted-index-by.d.ts +0 -62
- package/dist/types/array/sorted-index-by.d.ts.map +0 -1
- package/dist/types/array/sorted-index-with.d.ts +0 -64
- package/dist/types/array/sorted-index-with.d.ts.map +0 -1
- package/dist/types/array/sorted-index.d.ts +0 -46
- package/dist/types/array/sorted-index.d.ts.map +0 -1
- package/dist/types/array/sorted-last-index-by.d.ts +0 -62
- package/dist/types/array/sorted-last-index-by.d.ts.map +0 -1
- package/dist/types/array/sorted-last-index.d.ts +0 -46
- package/dist/types/array/sorted-last-index.d.ts.map +0 -1
- package/dist/types/array/splice.d.ts +0 -32
- package/dist/types/array/splice.d.ts.map +0 -1
- package/dist/types/array/split-at.d.ts +0 -28
- package/dist/types/array/split-at.d.ts.map +0 -1
- package/dist/types/array/split-when.d.ts +0 -24
- package/dist/types/array/split-when.d.ts.map +0 -1
- package/dist/types/array/sum-by.d.ts +0 -39
- package/dist/types/array/sum-by.d.ts.map +0 -1
- package/dist/types/array/swap-indices.d.ts +0 -68
- package/dist/types/array/swap-indices.d.ts.map +0 -1
- package/dist/types/array/take-first-by.d.ts +0 -42
- package/dist/types/array/take-first-by.d.ts.map +0 -1
- package/dist/types/array/take-while.d.ts +0 -24
- package/dist/types/array/take-while.d.ts.map +0 -1
- package/dist/types/array/take.d.ts +0 -30
- package/dist/types/array/take.d.ts.map +0 -1
- package/dist/types/array/uniq-by.d.ts +0 -22
- package/dist/types/array/uniq-by.d.ts.map +0 -1
- package/dist/types/array/uniq-with.d.ts +0 -44
- package/dist/types/array/uniq-with.d.ts.map +0 -1
- package/dist/types/array/uniq.d.ts +0 -35
- package/dist/types/array/uniq.d.ts.map +0 -1
- package/dist/types/array/zip-obj.d.ts +0 -26
- package/dist/types/array/zip-obj.d.ts.map +0 -1
- package/dist/types/array/zip-with.d.ts +0 -42
- package/dist/types/array/zip-with.d.ts.map +0 -1
- package/dist/types/array/zip.d.ts +0 -52
- package/dist/types/array/zip.d.ts.map +0 -1
- package/dist/types/function/conditional.d.ts +0 -107
- package/dist/types/function/conditional.d.ts.map +0 -1
- package/dist/types/function/create-pipe.d.ts +0 -19
- package/dist/types/function/create-pipe.d.ts.map +0 -1
- package/dist/types/function/debounce.d.ts +0 -92
- package/dist/types/function/debounce.d.ts.map +0 -1
- package/dist/types/function/identity.d.ts +0 -10
- package/dist/types/function/identity.d.ts.map +0 -1
- package/dist/types/function/index.d.ts +0 -11
- package/dist/types/function/index.d.ts.map +0 -1
- package/dist/types/function/noop.d.ts +0 -10
- package/dist/types/function/noop.d.ts.map +0 -1
- package/dist/types/function/once.d.ts +0 -13
- package/dist/types/function/once.d.ts.map +0 -1
- package/dist/types/function/pipe.d.ts +0 -53
- package/dist/types/function/pipe.d.ts.map +0 -1
- package/dist/types/function/purry.d.ts +0 -48
- package/dist/types/function/purry.d.ts.map +0 -1
- package/dist/types/function/sleep.d.ts +0 -12
- package/dist/types/function/sleep.d.ts.map +0 -1
- package/dist/types/function/times.d.ts +0 -28
- package/dist/types/function/times.d.ts.map +0 -1
- package/dist/types/guard/has-sub-object.d.ts +0 -35
- package/dist/types/guard/has-sub-object.d.ts.map +0 -1
- package/dist/types/guard/index.d.ts +0 -20
- package/dist/types/guard/index.d.ts.map +0 -1
- package/dist/types/guard/is-array.d.ts +0 -15
- package/dist/types/guard/is-array.d.ts.map +0 -1
- package/dist/types/guard/is-boolean.d.ts +0 -15
- package/dist/types/guard/is-boolean.d.ts.map +0 -1
- package/dist/types/guard/is-date.d.ts +0 -13
- package/dist/types/guard/is-date.d.ts.map +0 -1
- package/dist/types/guard/is-deep-equal.d.ts +0 -50
- package/dist/types/guard/is-deep-equal.d.ts.map +0 -1
- package/dist/types/guard/is-defined.d.ts +0 -22
- package/dist/types/guard/is-defined.d.ts.map +0 -1
- package/dist/types/guard/is-empty.d.ts +0 -30
- package/dist/types/guard/is-empty.d.ts.map +0 -1
- package/dist/types/guard/is-error.d.ts +0 -15
- package/dist/types/guard/is-error.d.ts.map +0 -1
- package/dist/types/guard/is-function.d.ts +0 -15
- package/dist/types/guard/is-function.d.ts.map +0 -1
- package/dist/types/guard/is-included-in.d.ts +0 -54
- package/dist/types/guard/is-included-in.d.ts.map +0 -1
- package/dist/types/guard/is-nil.d.ts +0 -14
- package/dist/types/guard/is-nil.d.ts.map +0 -1
- package/dist/types/guard/is-non-null.d.ts +0 -15
- package/dist/types/guard/is-non-null.d.ts.map +0 -1
- package/dist/types/guard/is-not.d.ts +0 -15
- package/dist/types/guard/is-not.d.ts.map +0 -1
- package/dist/types/guard/is-number.d.ts +0 -14
- package/dist/types/guard/is-number.d.ts.map +0 -1
- package/dist/types/guard/is-object.d.ts +0 -28
- package/dist/types/guard/is-object.d.ts.map +0 -1
- package/dist/types/guard/is-promise.d.ts +0 -14
- package/dist/types/guard/is-promise.d.ts.map +0 -1
- package/dist/types/guard/is-string.d.ts +0 -14
- package/dist/types/guard/is-string.d.ts.map +0 -1
- package/dist/types/guard/is-symbol.d.ts +0 -14
- package/dist/types/guard/is-symbol.d.ts.map +0 -1
- package/dist/types/guard/is-truthy.d.ts +0 -17
- package/dist/types/guard/is-truthy.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -10
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/number/add.d.ts +0 -28
- package/dist/types/number/add.d.ts.map +0 -1
- package/dist/types/number/ceil.d.ts +0 -36
- package/dist/types/number/ceil.d.ts.map +0 -1
- package/dist/types/number/clamp.d.ts +0 -37
- package/dist/types/number/clamp.d.ts.map +0 -1
- package/dist/types/number/divide.d.ts +0 -26
- package/dist/types/number/divide.d.ts.map +0 -1
- package/dist/types/number/floor.d.ts +0 -36
- package/dist/types/number/floor.d.ts.map +0 -1
- package/dist/types/number/index.d.ts +0 -9
- package/dist/types/number/index.d.ts.map +0 -1
- package/dist/types/number/multiply.d.ts +0 -28
- package/dist/types/number/multiply.d.ts.map +0 -1
- package/dist/types/number/round.d.ts +0 -36
- package/dist/types/number/round.d.ts.map +0 -1
- package/dist/types/number/subtract.d.ts +0 -30
- package/dist/types/number/subtract.d.ts.map +0 -1
- package/dist/types/object/add-prop.d.ts +0 -30
- package/dist/types/object/add-prop.d.ts.map +0 -1
- package/dist/types/object/clone.d.ts +0 -10
- package/dist/types/object/clone.d.ts.map +0 -1
- package/dist/types/object/for-each-obj.d.ts +0 -44
- package/dist/types/object/for-each-obj.d.ts.map +0 -1
- package/dist/types/object/from-keys.d.ts +0 -42
- package/dist/types/object/from-keys.d.ts.map +0 -1
- package/dist/types/object/from-pairs.d.ts +0 -47
- package/dist/types/object/from-pairs.d.ts.map +0 -1
- package/dist/types/object/index.d.ts +0 -24
- package/dist/types/object/index.d.ts.map +0 -1
- package/dist/types/object/invert.d.ts +0 -30
- package/dist/types/object/invert.d.ts.map +0 -1
- package/dist/types/object/keys.d.ts +0 -39
- package/dist/types/object/keys.d.ts.map +0 -1
- package/dist/types/object/map-keys.d.ts +0 -24
- package/dist/types/object/map-keys.d.ts.map +0 -1
- package/dist/types/object/map-values.d.ts +0 -25
- package/dist/types/object/map-values.d.ts.map +0 -1
- package/dist/types/object/merge-deep.d.ts +0 -32
- package/dist/types/object/merge-deep.d.ts.map +0 -1
- package/dist/types/object/merge.d.ts +0 -52
- package/dist/types/object/merge.d.ts.map +0 -1
- package/dist/types/object/omit-by.d.ts +0 -22
- package/dist/types/object/omit-by.d.ts.map +0 -1
- package/dist/types/object/omit.d.ts +0 -24
- package/dist/types/object/omit.d.ts.map +0 -1
- package/dist/types/object/path-or.d.ts +0 -78
- package/dist/types/object/path-or.d.ts.map +0 -1
- package/dist/types/object/pick-by.d.ts +0 -24
- package/dist/types/object/pick-by.d.ts.map +0 -1
- package/dist/types/object/pick.d.ts +0 -22
- package/dist/types/object/pick.d.ts.map +0 -1
- package/dist/types/object/prop.d.ts +0 -11
- package/dist/types/object/prop.d.ts.map +0 -1
- package/dist/types/object/set-path.d.ts +0 -31
- package/dist/types/object/set-path.d.ts.map +0 -1
- package/dist/types/object/set.d.ts +0 -26
- package/dist/types/object/set.d.ts.map +0 -1
- package/dist/types/object/swap-props.d.ts +0 -44
- package/dist/types/object/swap-props.d.ts.map +0 -1
- package/dist/types/object/to-pairs.d.ts +0 -33
- package/dist/types/object/to-pairs.d.ts.map +0 -1
- package/dist/types/object/values.d.ts +0 -21
- package/dist/types/object/values.d.ts.map +0 -1
- package/dist/types/string/cases-types.d.ts +0 -36
- package/dist/types/string/cases-types.d.ts.map +0 -1
- package/dist/types/string/cases.d.ts +0 -22
- package/dist/types/string/cases.d.ts.map +0 -1
- package/dist/types/string/human-readable-file-size.d.ts +0 -13
- package/dist/types/string/human-readable-file-size.d.ts.map +0 -1
- package/dist/types/string/index.d.ts +0 -6
- package/dist/types/string/index.d.ts.map +0 -1
- package/dist/types/string/random-string.d.ts +0 -15
- package/dist/types/string/random-string.d.ts.map +0 -1
- package/dist/types/string/slugify.d.ts +0 -12
- package/dist/types/string/slugify.d.ts.map +0 -1
- package/dist/types/string/string-to-path.d.ts +0 -11
- package/dist/types/string/string-to-path.d.ts.map +0 -1
- package/dist/types/type/index.d.ts +0 -2
- package/dist/types/type/index.d.ts.map +0 -1
- package/dist/types/type/type.d.ts +0 -19
- package/dist/types/type/type.d.ts.map +0 -1
- package/dist/types/utils/binary-search-cutoff-index.d.ts +0 -2
- package/dist/types/utils/binary-search-cutoff-index.d.ts.map +0 -1
- package/dist/types/utils/heap.d.ts +0 -24
- package/dist/types/utils/heap.d.ts.map +0 -1
- package/dist/types/utils/narrow.d.ts +0 -52
- package/dist/types/utils/narrow.d.ts.map +0 -1
- package/dist/types/utils/paths.d.ts +0 -9
- package/dist/types/utils/paths.d.ts.map +0 -1
- package/dist/types/utils/purry-on.d.ts +0 -7
- package/dist/types/utils/purry-on.d.ts.map +0 -1
- package/dist/types/utils/purry-order-rules.d.ts +0 -52
- package/dist/types/utils/purry-order-rules.d.ts.map +0 -1
- package/dist/types/utils/quick-select.d.ts +0 -18
- package/dist/types/utils/quick-select.d.ts.map +0 -1
- package/dist/types/utils/reduce-lazy.d.ts +0 -3
- package/dist/types/utils/reduce-lazy.d.ts.map +0 -1
- package/dist/types/utils/swap-in-place.d.ts +0 -5
- package/dist/types/utils/swap-in-place.d.ts.map +0 -1
- package/dist/types/utils/to-lazy-indexed.d.ts +0 -4
- package/dist/types/utils/to-lazy-indexed.d.ts.map +0 -1
- package/dist/types/utils/to-single.d.ts +0 -6
- package/dist/types/utils/to-single.d.ts.map +0 -1
- package/dist/types/utils/types.d.ts +0 -32
- package/dist/types/utils/types.d.ts.map +0 -1
- package/dist/types/utils/with-precision.d.ts +0 -2
- package/dist/types/utils/with-precision.d.ts.map +0 -1
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
type IndexedIteratee<T extends Record<PropertyKey, unknown>, K extends keyof T> = (value: T[K], key: K, obj: T) => void;
|
|
2
|
-
type UnindexedIteratee<T extends Record<PropertyKey, unknown>> = (value: T[keyof T]) => void;
|
|
3
|
-
/**
|
|
4
|
-
* Iterate an object using a defined callback function. The original object is returned.
|
|
5
|
-
* @param object The object.
|
|
6
|
-
* @param fn The callback function.
|
|
7
|
-
* @returns The original object
|
|
8
|
-
* @signature
|
|
9
|
-
* P.forEachObj(object, fn)
|
|
10
|
-
* @example
|
|
11
|
-
* P.forEachObj({a: 1}, (val) => {
|
|
12
|
-
* console.log(`${val}`)
|
|
13
|
-
* }) // "1"
|
|
14
|
-
* P.forEachObj.indexed({a: 1}, (val, key, obj) => {
|
|
15
|
-
* console.log(`${key}: ${val}`)
|
|
16
|
-
* }) // "a: 1"
|
|
17
|
-
* @dataFirst
|
|
18
|
-
* @category Object
|
|
19
|
-
*/
|
|
20
|
-
export declare function forEachObj<T extends Record<PropertyKey, unknown>>(object: T, fn: UnindexedIteratee<T>): T;
|
|
21
|
-
/**
|
|
22
|
-
* Iterate an object using a defined callback function. The original object is returned.
|
|
23
|
-
* @param fn The callback function.
|
|
24
|
-
* @signature
|
|
25
|
-
* P.forEachObj(fn)(object)
|
|
26
|
-
* @example
|
|
27
|
-
* P.pipe(
|
|
28
|
-
* {a: 1},
|
|
29
|
-
* P.forEachObj((val) => console.log(`${val}`))
|
|
30
|
-
* ) // "1"
|
|
31
|
-
* P.pipe(
|
|
32
|
-
* {a: 1},
|
|
33
|
-
* P.forEachObj.indexed((val, key) => console.log(`${key}: ${val}`))
|
|
34
|
-
* ) // "a: 1"
|
|
35
|
-
* @dataLast
|
|
36
|
-
* @category Object
|
|
37
|
-
*/
|
|
38
|
-
export declare function forEachObj<T extends Record<PropertyKey, unknown>>(fn: UnindexedIteratee<T>): (object: T) => T;
|
|
39
|
-
export declare namespace forEachObj {
|
|
40
|
-
function indexed<T extends Record<PropertyKey, unknown>>(object: T, fn: IndexedIteratee<T, keyof T>): T;
|
|
41
|
-
function indexed<T extends Record<PropertyKey, unknown>>(fn: IndexedIteratee<T, keyof T>): (object: T) => T;
|
|
42
|
-
}
|
|
43
|
-
export {};
|
|
44
|
-
//# sourceMappingURL=for-each-obj.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"for-each-obj.d.ts","sourceRoot":"","sources":["../../../src/object/for-each-obj.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,CAClB,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,CAAC,SAAS,MAAM,CAAC,IACf,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;AAC1C,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,CAC/D,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KACd,IAAI,CAAC;AACV;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAC/D,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC,GACvB,CAAC,CAAC;AAEL;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAC/D,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC,GACvB,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;AA8BpB,yBAAiB,UAAU,CAAC;IAC1B,SAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAC5D,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAC9B,CAAC,CAAC;IACL,SAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAC5D,EAAE,EAAE,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAC9B,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;CAIrB"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { Simplify } from 'type-fest';
|
|
2
|
-
import type { IterableContainer } from '../utils/types';
|
|
3
|
-
type ExactlyOneKey<T, V> = T extends PropertyKey ? {
|
|
4
|
-
[P in T]: V;
|
|
5
|
-
} : never;
|
|
6
|
-
type FromKeys<T extends IterableContainer, V> = T extends readonly [] ? {} : T extends readonly [infer Head, ...infer Rest] ? ExactlyOneKey<Head, V> & FromKeys<Rest, V> : T[number] extends PropertyKey ? Partial<Record<T[number], V>> : never;
|
|
7
|
-
/**
|
|
8
|
-
* Creates an object that maps each key in `data` to the result of `mapper` for
|
|
9
|
-
* that key. Duplicate keys are overwritten, guaranteeing that `mapper` is run
|
|
10
|
-
* for each item in `data`.
|
|
11
|
-
*
|
|
12
|
-
* @param data - An array of keys of the output object. All items in the array
|
|
13
|
-
* would be keys in the output array.
|
|
14
|
-
* @param mapper - Takes a key and returns the value that would be associated
|
|
15
|
-
* with that key.
|
|
16
|
-
* @signature
|
|
17
|
-
* P.fromKeys(data, mapper);
|
|
18
|
-
* @example
|
|
19
|
-
* P.fromKeys(["cat", "dog"], P.length()); // { cat: 3, dog: 3 } (typed as Partial<Record<"cat" | "dog", number>>)
|
|
20
|
-
* P.fromKeys([1, 2], P.add(1)); // { 1: 2, 2: 3 } (typed as Partial<Record<1 | 2, number>>)
|
|
21
|
-
* @dataFirst
|
|
22
|
-
* @category Object
|
|
23
|
-
*/
|
|
24
|
-
export declare function fromKeys<T extends IterableContainer<PropertyKey>, V>(data: T, mapper: (item: T[number]) => V): Simplify<FromKeys<T, V>>;
|
|
25
|
-
/**
|
|
26
|
-
* Creates an object that maps each key in `data` to the result of `mapper` for
|
|
27
|
-
* that key. Duplicate keys are overwritten, guaranteeing that `mapper` is run
|
|
28
|
-
* for each item in `data`.
|
|
29
|
-
*
|
|
30
|
-
* @param mapper - Takes a key and returns the value that would be associated
|
|
31
|
-
* with that key.
|
|
32
|
-
* @signature
|
|
33
|
-
* P.fromKeys(mapper)(data);
|
|
34
|
-
* @example
|
|
35
|
-
* P.pipe(["cat", "dog"], P.fromKeys(P.length())); // { cat: 3, dog: 3 } (typed as Partial<Record<"cat" | "dog", number>>)
|
|
36
|
-
* P.pipe([1, 2], P.fromKeys(P.add(1))); // { 1: 2, 2: 3 } (typed as Partial<Record<1 | 2, number>>)
|
|
37
|
-
* @dataLast
|
|
38
|
-
* @category Object
|
|
39
|
-
*/
|
|
40
|
-
export declare function fromKeys<T extends IterableContainer<PropertyKey>, V>(mapper: (item: T[number]) => V): (data: T) => Simplify<FromKeys<T, V>>;
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=from-keys.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"from-keys.d.ts","sourceRoot":"","sources":["../../../src/object/from-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAOxD,KAAK,aAAa,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,WAAW,GAAG;KAAG,CAAC,IAAI,CAAC,GAAG,CAAC;CAAE,GAAG,KAAK,CAAC;AAE3E,KAAK,QAAQ,CAAC,CAAC,SAAS,iBAAiB,EAAE,CAAC,IAAI,CAAC,SAAS,SAAS,EAAE,GAEjE,EAAE,GACF,CAAC,SAAS,SAAS,CAAC,MAAM,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GAC5C,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,GAC1C,CAAC,CAAC,MAAM,CAAC,SAAS,WAAW,GAC3B,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,GAC7B,KAAK,CAAC;AAEd;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,iBAAiB,CAAC,WAAW,CAAC,EAAE,CAAC,EAClE,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAC7B,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE5B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,iBAAiB,CAAC,WAAW,CAAC,EAAE,CAAC,EAClE,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAC7B,CAAC,IAAI,EAAE,CAAC,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { IterableContainer } from '../utils/types';
|
|
2
|
-
type Entry<Key extends PropertyKey = PropertyKey, Value = unknown> = readonly [
|
|
3
|
-
key: Key,
|
|
4
|
-
value: Value
|
|
5
|
-
];
|
|
6
|
-
/**
|
|
7
|
-
* Creates a new object from an array of tuples by pairing up first and second elements as `{[key]: value}`.
|
|
8
|
-
* If a tuple is not supplied for any element in the array, the element will be ignored
|
|
9
|
-
* If duplicate keys exist, the tuple with the greatest index in the input array will be preferred.
|
|
10
|
-
*
|
|
11
|
-
* The strict option supports more sophisticated use-cases like those that would
|
|
12
|
-
* result when calling the strict `toPairs` function.
|
|
13
|
-
* @param pairs the list of input tuples
|
|
14
|
-
* @signature
|
|
15
|
-
* P.fromPairs(tuples)
|
|
16
|
-
* P.fromPairs.strict(tuples)
|
|
17
|
-
* @example
|
|
18
|
-
* P.fromPairs([['a', 'b'], ['c', 'd']]) // => {a: 'b', c: 'd'} (type: Record<string, string>)
|
|
19
|
-
* P.fromPairs.strict(['a', 1] as const) // => {a: 1} (type: {a: 1})
|
|
20
|
-
* P.pipe(
|
|
21
|
-
* [['a', 'b'], ['c', 'd']],
|
|
22
|
-
* P.fromPairs,
|
|
23
|
-
* ); // => {a: 'b', c: 'd'} (type: Record<string, string>)
|
|
24
|
-
* P.pipe(
|
|
25
|
-
* ['a', 1] as const,
|
|
26
|
-
* P.fromPairs.strict,
|
|
27
|
-
* ); // => {a: 1} (type: {a: 1})
|
|
28
|
-
* @category Object
|
|
29
|
-
* @strict
|
|
30
|
-
* @dataFirst
|
|
31
|
-
*/
|
|
32
|
-
export declare function fromPairs<V>(pairs: ReadonlyArray<Entry<number, V>>): Record<number, V>;
|
|
33
|
-
export declare function fromPairs<V>(pairs: ReadonlyArray<Entry<string, V>>): Record<string, V>;
|
|
34
|
-
type Strict = <Entries extends IterableContainer<Entry>>(entries: Entries) => StrictOut<Entries>;
|
|
35
|
-
type StrictOut<Entries> = Entries extends readonly [infer First, ...infer Tail] ? FromPairsTuple<First, Tail> : Entries extends readonly [...infer Head, infer Last] ? FromPairsTuple<Last, Head> : Entries extends IterableContainer<Entry> ? FromPairsArray<Entries> : 'ERROR: Entries array-like could not be infered';
|
|
36
|
-
type FromPairsTuple<E, Rest> = E extends Entry ? Record<E[0], E[1]> & StrictOut<Rest> : 'ERROR: Array-like contains a non-entry element';
|
|
37
|
-
type FromPairsArray<Entries extends IterableContainer<Entry>> = string extends AllKeys<Entries> ? Record<string, Entries[number][1]> : number extends AllKeys<Entries> ? Record<number, Entries[number][1]> : symbol extends AllKeys<Entries> ? Record<symbol, Entries[number][1]> : FromPairsArrayWithLiteralKeys<Entries>;
|
|
38
|
-
type FromPairsArrayWithLiteralKeys<Entries extends IterableContainer<Entry>> = {
|
|
39
|
-
[K in AllKeys<Entries>]?: ValueForKey<Entries, K>;
|
|
40
|
-
};
|
|
41
|
-
type AllKeys<Entries extends IterableContainer<Entry>> = Extract<Entries[number], Entry>[0];
|
|
42
|
-
type ValueForKey<Entries extends IterableContainer<Entry>, K extends PropertyKey> = (Extract<Entries[number], Entry<K>> extends never ? Entries[number] : Extract<Entries[number], Entry<K>>)[1];
|
|
43
|
-
export declare namespace fromPairs {
|
|
44
|
-
const strict: Strict;
|
|
45
|
-
}
|
|
46
|
-
export {};
|
|
47
|
-
//# sourceMappingURL=from-pairs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"from-pairs.d.ts","sourceRoot":"","sources":["../../../src/object/from-pairs.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export * from './add-prop';
|
|
2
|
-
export * from './clone';
|
|
3
|
-
export * from './for-each-obj';
|
|
4
|
-
export * from './from-keys';
|
|
5
|
-
export * from './from-pairs';
|
|
6
|
-
export * from './index';
|
|
7
|
-
export * from './invert';
|
|
8
|
-
export * from './keys';
|
|
9
|
-
export * from './map-keys';
|
|
10
|
-
export * from './map-values';
|
|
11
|
-
export * from './merge';
|
|
12
|
-
export * from './merge-deep';
|
|
13
|
-
export * from './omit';
|
|
14
|
-
export * from './omit-by';
|
|
15
|
-
export * from './path-or';
|
|
16
|
-
export * from './pick';
|
|
17
|
-
export * from './pick-by';
|
|
18
|
-
export * from './prop';
|
|
19
|
-
export * from './set';
|
|
20
|
-
export * from './set-path';
|
|
21
|
-
export * from './swap-props';
|
|
22
|
-
export * from './to-pairs';
|
|
23
|
-
export * from './values';
|
|
24
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/object/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
type Inverted<T extends object> = T[keyof T] extends PropertyKey ? Record<T[keyof T], keyof T> : never;
|
|
2
|
-
/**
|
|
3
|
-
* Returns an object whose keys are values are swapped. If the object contains duplicate values,
|
|
4
|
-
* subsequent values will overwrite previous values.
|
|
5
|
-
*
|
|
6
|
-
* @param object the object
|
|
7
|
-
* @signature
|
|
8
|
-
* P.invert(object)
|
|
9
|
-
* @example
|
|
10
|
-
* P.invert({ a: "d", b: "e", c: "f" }) // => { d: "a", e: "b", f: "c" }
|
|
11
|
-
* @dataFirst
|
|
12
|
-
* @category Object
|
|
13
|
-
* @pipeable
|
|
14
|
-
*/
|
|
15
|
-
export declare function invert<T extends object>(object: T): Inverted<T>;
|
|
16
|
-
/**
|
|
17
|
-
* Returns an object whose keys are values are swapped. If the object contains duplicate values,
|
|
18
|
-
* subsequent values will overwrite previous values.
|
|
19
|
-
*
|
|
20
|
-
* @signature
|
|
21
|
-
* P.invert()(object)
|
|
22
|
-
* @example
|
|
23
|
-
* P.pipe({ a: "d", b: "e", c: "f" }, P.invert()); // => { d: "a", e: "b", f: "c" }
|
|
24
|
-
* @dataLast
|
|
25
|
-
* @category Object
|
|
26
|
-
* @pipeable
|
|
27
|
-
*/
|
|
28
|
-
export declare function invert<T extends object>(): (object: T) => Inverted<T>;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=invert.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invert.d.ts","sourceRoot":"","sources":["../../../src/object/invert.ts"],"names":[],"mappings":"AAEA,KAAK,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,WAAW,GAC5D,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAC3B,KAAK,CAAC;AAEV;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC,MAAM,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { IterableContainer } from '../utils/types';
|
|
2
|
-
/**
|
|
3
|
-
* Returns a new array containing the keys of the array or object.
|
|
4
|
-
*
|
|
5
|
-
* @param source Either an array or an object
|
|
6
|
-
* @signature
|
|
7
|
-
* P.keys(source)
|
|
8
|
-
* P.keys.strict(source)
|
|
9
|
-
* @example
|
|
10
|
-
* P.keys(['x', 'y', 'z']) // => ['0', '1', '2']
|
|
11
|
-
* P.keys({ a: 'x', b: 'y', c: 'z' }) // => ['a', 'b', 'c']
|
|
12
|
-
* P.keys.strict({ a: 'x', b: 'y', 5: 'z' } as const ) // => ['a', 'b', '5'], typed Array<'a' | 'b' | '5'>
|
|
13
|
-
* P.pipe(['x', 'y', 'z'], P.keys) // => ['0', '1', '2']
|
|
14
|
-
* P.pipe({ a: 'x', b: 'y', c: 'z' }, P.keys) // => ['a', 'b', 'c']
|
|
15
|
-
* P.pipe(
|
|
16
|
-
* { a: 'x', b: 'y', c: 'z' },
|
|
17
|
-
* P.keys,
|
|
18
|
-
* P.first(),
|
|
19
|
-
* ) // => 'a'
|
|
20
|
-
* P.pipe({ a: 'x', b: 'y', 5: 'z' } as const, P.keys.strict) // => ['a', 'b', '5'], typed Array<'a' | 'b' | '5'>
|
|
21
|
-
* @pipeable
|
|
22
|
-
* @strict
|
|
23
|
-
* @category Object
|
|
24
|
-
* @dataFirst
|
|
25
|
-
*/
|
|
26
|
-
export declare function keys(source: ArrayLike<unknown> | Readonly<Record<PropertyKey, unknown>>): Array<string>;
|
|
27
|
-
type Strict = <T extends object>(data: T) => Keys<T>;
|
|
28
|
-
type Keys<T> = T extends IterableContainer ? ArrayKeys<T> : ObjectKeys<T>;
|
|
29
|
-
type ArrayKeys<T extends IterableContainer> = {
|
|
30
|
-
-readonly [Index in keyof T]: Index extends number | string ? `${IsIndexAfterSpread<T, Index> extends true ? number : Index}` : never;
|
|
31
|
-
};
|
|
32
|
-
type IsIndexAfterSpread<T extends IterableContainer, Index extends number | string> = IndicesAfterSpread<T> extends never ? false : Index extends `${IndicesAfterSpread<T>}` ? true : false;
|
|
33
|
-
type IndicesAfterSpread<T extends [] | ReadonlyArray<unknown>, Iterations extends ReadonlyArray<unknown> = []> = T[number] extends never ? never : T extends readonly [unknown, ...infer Tail] ? IndicesAfterSpread<Tail, [unknown, ...Iterations]> : T extends readonly [...infer Head, unknown] ? IndicesAfterSpread<Head, [unknown, ...Iterations]> | Iterations['length'] : Iterations['length'];
|
|
34
|
-
type ObjectKeys<T> = T extends Record<PropertyKey, never> ? [] : Array<`${Exclude<keyof T, symbol>}`>;
|
|
35
|
-
export declare namespace keys {
|
|
36
|
-
const strict: Strict;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
39
|
-
//# sourceMappingURL=keys.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/object/keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,IAAI,CAClB,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,GAClE,KAAK,CAAC,MAAM,CAAC,CAAC;AA+BjB,KAAK,MAAM,GAET,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC;AACzC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,iBAAiB,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAK1E,KAAK,SAAS,CAAC,CAAC,SAAS,iBAAiB,IAAI;IAC5C,CAAC,UAAU,KAAK,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,MAAM,GAAG,MAAM,GAGvD,GAAG,kBAAkB,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,IAAI,GAAG,MAAM,GAAG,KAAK,EAAE,GAGjE,KAAK;CACR,CAAC;AAEF,KAAK,kBAAkB,CACrB,CAAC,SAAS,iBAAiB,EAC3B,KAAK,SAAS,MAAM,GAAG,MAAM,IAE7B,kBAAkB,CAAC,CAAC,CAAC,SAAS,KAAK,GAC/B,KAAK,GACL,KAAK,SAAS,GAAG,kBAAkB,CAAC,CAAC,CAAC,EAAE,GACtC,IAAI,GACJ,KAAK,CAAC;AAOd,KAAK,kBAAkB,CACrB,CAAC,SAAS,EAAE,GAAG,aAAa,CAAC,OAAO,CAAC,EAGrC,UAAU,SAAS,aAAa,CAAC,OAAO,CAAC,GAAG,EAAE,IAC5C,CAAC,CAAC,MAAM,CAAC,SAAS,KAAK,GACvB,KAAK,GACL,CAAC,SAAS,SAAS,CAAC,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,GACzC,kBAAkB,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC,GAClD,CAAC,SAAS,SAAS,CAAC,GAAG,MAAM,IAAI,EAAE,OAAO,CAAC,GAEzC,kBAAkB,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC,GAClD,UAAU,CAAC,QAAQ,CAAC,GACpB,UAAU,CAAC,QAAQ,CAAC,CAAC;AAE7B,KAAK,UAAU,CAAC,CAAC,IACf,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,GAChC,EAAE,GACF,KAAK,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;AAC3C,yBAAiB,IAAI,CAAC;IACb,MAAM,MAAM,QAAiB,CAAC;CACtC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Maps keys of `object` and keeps the same values.
|
|
3
|
-
* @param data the object to map
|
|
4
|
-
* @param fn the mapping function
|
|
5
|
-
* @signature
|
|
6
|
-
* P.mapKeys(object, fn)
|
|
7
|
-
* @example
|
|
8
|
-
* P.mapKeys({a: 1, b: 2}, (key, value) => key + value) // => { a1: 1, b2: 2 }
|
|
9
|
-
* @dataFirst
|
|
10
|
-
* @category Object
|
|
11
|
-
*/
|
|
12
|
-
export declare function mapKeys<T, S extends PropertyKey>(data: T, fn: (key: keyof T, value: Required<T>[keyof T]) => S): Record<S, T[keyof T]>;
|
|
13
|
-
/**
|
|
14
|
-
* Maps keys of `object` and keeps the same values.
|
|
15
|
-
* @param fn the mapping function
|
|
16
|
-
* @signature
|
|
17
|
-
* P.mapKeys(fn)(object)
|
|
18
|
-
* @example
|
|
19
|
-
* P.pipe({a: 1, b: 2}, P.mapKeys((key, value) => key + value)) // => { a1: 1, b2: 2 }
|
|
20
|
-
* @dataLast
|
|
21
|
-
* @category Object
|
|
22
|
-
*/
|
|
23
|
-
export declare function mapKeys<T, S extends PropertyKey>(fn: (key: keyof T, value: Required<T>[keyof T]) => S): (data: T) => Record<S, T[keyof T]>;
|
|
24
|
-
//# sourceMappingURL=map-keys.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-keys.d.ts","sourceRoot":"","sources":["../../../src/object/map-keys.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,EAC9C,IAAI,EAAE,CAAC,EACP,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GACnD,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAEzB;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,EAC9C,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GACnD,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ObjectKeys } from '../utils/types';
|
|
2
|
-
/**
|
|
3
|
-
* Maps values of `object` and keeps the same keys.
|
|
4
|
-
* @param data the object to map
|
|
5
|
-
* @param fn the mapping function
|
|
6
|
-
* @signature
|
|
7
|
-
* P.mapValues(object, fn)
|
|
8
|
-
* @example
|
|
9
|
-
* P.mapValues({a: 1, b: 2}, (value, key) => value + key) // => {a: '1a', b: '2b'}
|
|
10
|
-
* @dataFirst
|
|
11
|
-
* @category Object
|
|
12
|
-
*/
|
|
13
|
-
export declare function mapValues<T extends Record<PropertyKey, unknown>, S>(data: T, fn: (value: T[ObjectKeys<T>], key: ObjectKeys<T>) => S): Record<ObjectKeys<T>, S>;
|
|
14
|
-
/**
|
|
15
|
-
* Maps values of `object` and keeps the same keys.
|
|
16
|
-
* @param fn the mapping function
|
|
17
|
-
* @signature
|
|
18
|
-
* P.mapValues(fn)(object)
|
|
19
|
-
* @example
|
|
20
|
-
* P.pipe({a: 1, b: 2}, P.mapValues((value, key) => value + key)) // => {a: '1a', b: '2b'}
|
|
21
|
-
* @dataLast
|
|
22
|
-
* @category Object
|
|
23
|
-
*/
|
|
24
|
-
export declare function mapValues<T extends Record<PropertyKey, unknown>, S>(fn: (value: T[keyof T], key: keyof T) => S): (data: T) => Record<ObjectKeys<T>, S>;
|
|
25
|
-
//# sourceMappingURL=map-values.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-values.d.ts","sourceRoot":"","sources":["../../../src/object/map-values.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAKjD;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC,EACjE,IAAI,EAAE,CAAC,EACP,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GACrD,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE5B;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC,EACjE,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,GACzC,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { MergeDeep } from 'type-fest';
|
|
2
|
-
/**
|
|
3
|
-
* Merges the `source` object into the `destination` object. The merge is similar to performing `{ ...destination, ... source }` (where disjoint values from each object would be copied as-is, and for any overlapping props the value from `source` would be used); But for *each prop* (`p`), if **both** `destination` and `source` have a **plain-object** as a value, the value would be taken as the result of recursively deepMerging them (`result.p === deepMerge(destination.p, source.p)`).
|
|
4
|
-
*
|
|
5
|
-
* @param destination - The object to merge into. In general, this object would have it's values overridden.
|
|
6
|
-
* @param source - The object to merge from. In general, shared keys would be taken from this object.
|
|
7
|
-
* @returns - The merged object.
|
|
8
|
-
* @signature
|
|
9
|
-
* P.mergeDeep(destination, source)
|
|
10
|
-
* @example
|
|
11
|
-
* P.mergeDeep({ foo: 'bar', x: 1 }, { foo: 'baz', y: 2 }) // => { foo: 'baz', x: 1, y: 2 }
|
|
12
|
-
* @dataFirst
|
|
13
|
-
* @category Object
|
|
14
|
-
*/
|
|
15
|
-
export declare function mergeDeep<Destination extends Record<string, unknown>, Source extends Record<string, unknown>>(destination: Destination, source: Source): MergeDeep<Destination, Source>;
|
|
16
|
-
/**
|
|
17
|
-
* Merges the `source` object into the `destination` object. The merge is similar to performing `{ ...destination, ... source }` (where disjoint values from each object would be copied as-is, and for any overlapping props the value from `source` would be used); But for *each prop* (`p`), if **both** `destination` and `source` have a **plain-object** as a value, the value would be taken as the result of recursively deepMerging them (`result.p === deepMerge(destination.p, source.p)`).
|
|
18
|
-
*
|
|
19
|
-
* @param source - The object to merge from. In general, shared keys would be taken from this object.
|
|
20
|
-
* @returns - The merged object.
|
|
21
|
-
* @signature
|
|
22
|
-
* P.mergeDeep(source)(destination)
|
|
23
|
-
* @example
|
|
24
|
-
* P.pipe(
|
|
25
|
-
* { foo: 'bar', x: 1 },
|
|
26
|
-
* P.mergeDeep({ foo: 'baz', y: 2 }),
|
|
27
|
-
* ); // => { foo: 'baz', x: 1, y: 2 }
|
|
28
|
-
* @dataLast
|
|
29
|
-
* @category Object
|
|
30
|
-
*/
|
|
31
|
-
export declare function mergeDeep<Destination extends Record<string, unknown>, Source extends Record<string, unknown>>(source: Source): (target: Destination) => MergeDeep<Destination, Source>;
|
|
32
|
-
//# sourceMappingURL=merge-deep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-deep.d.ts","sourceRoot":"","sources":["../../../src/object/merge-deep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CACvB,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CACvB,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Merge } from 'type-fest';
|
|
2
|
-
/**
|
|
3
|
-
* Merges two objects into one by combining their properties, effectively
|
|
4
|
-
* creating a new object that incorporates elements from both. The merge
|
|
5
|
-
* operation prioritizes the second object's properties, allowing them to
|
|
6
|
-
* overwrite those from the first object with the same names.
|
|
7
|
-
*
|
|
8
|
-
* Equivalent to `{ ...data, ...source }`.
|
|
9
|
-
*
|
|
10
|
-
* @param data - The destination object, serving as the basis for the merge.
|
|
11
|
-
* Properties from this object are included in the new object, but will be
|
|
12
|
-
* overwritten by properties from the source object with matching keys.
|
|
13
|
-
* @param source - The source object, whose properties will be included in the
|
|
14
|
-
* new object. If properties in this object share keys with properties in the
|
|
15
|
-
* destination object, the values from the source object will be used in the
|
|
16
|
-
* new object.
|
|
17
|
-
* @returns An object fully containing `source`, and any properties from `data`
|
|
18
|
-
* that don't share a name with any property in `source`.
|
|
19
|
-
* @signature
|
|
20
|
-
* R.merge(data, source)
|
|
21
|
-
* @example
|
|
22
|
-
* R.merge({ x: 1, y: 2 }, { y: 10, z: 2 }) // => { x: 1, y: 10, z: 2 }
|
|
23
|
-
* @dataFirst
|
|
24
|
-
* @category Object
|
|
25
|
-
*/
|
|
26
|
-
export declare function merge<T, Source>(data: T, source: Source): Merge<T, Source>;
|
|
27
|
-
/**
|
|
28
|
-
* Merges two objects into one by combining their properties, effectively
|
|
29
|
-
* creating a new object that incorporates elements from both. The merge
|
|
30
|
-
* operation prioritizes the second object's properties, allowing them to
|
|
31
|
-
* overwrite those from the first object with the same names.
|
|
32
|
-
*
|
|
33
|
-
* Equivalent to `{ ...data, ...source }`.
|
|
34
|
-
*
|
|
35
|
-
* @param source - The source object, whose properties will be included in the
|
|
36
|
-
* new object. If properties in this object share keys with properties in the
|
|
37
|
-
* destination object, the values from the source object will be used in the
|
|
38
|
-
* new object.
|
|
39
|
-
* @returns An object fully containing `source`, and any properties from `data`
|
|
40
|
-
* that don't share a name with any property in `source`.
|
|
41
|
-
* @signature
|
|
42
|
-
* R.merge(source)(data)
|
|
43
|
-
* @example
|
|
44
|
-
* R.pipe(
|
|
45
|
-
* { x: 1, y: 2 },
|
|
46
|
-
* R.merge({ y: 10, z: 2 }),
|
|
47
|
-
* ); // => { x: 1, y: 10, z: 2 }
|
|
48
|
-
* @dataLast
|
|
49
|
-
* @category Object
|
|
50
|
-
*/
|
|
51
|
-
export declare function merge<Source>(source: Source): <T>(data: T) => Merge<T, Source>;
|
|
52
|
-
//# sourceMappingURL=merge.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/object/merge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIvC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a partial copy of an object omitting the keys matching predicate.
|
|
3
|
-
* @param object the target object
|
|
4
|
-
* @param fn the predicate
|
|
5
|
-
* @signature P.omitBy(object, fn)
|
|
6
|
-
* @example
|
|
7
|
-
* P.omitBy({a: 1, b: 2, A: 3, B: 4}, (val, key) => key.toUpperCase() === key) // => {a: 1, b: 2}
|
|
8
|
-
* @dataFirst
|
|
9
|
-
* @category Object
|
|
10
|
-
*/
|
|
11
|
-
export declare function omitBy<T>(object: T, fn: <K extends keyof T>(value: T[K], key: K) => boolean): T extends Record<keyof T, T[keyof T]> ? T : Partial<T>;
|
|
12
|
-
/**
|
|
13
|
-
* Returns a partial copy of an object omitting the keys matching predicate.
|
|
14
|
-
* @param fn the predicate
|
|
15
|
-
* @signature P.omitBy(fn)(object)
|
|
16
|
-
* @example
|
|
17
|
-
* P.omitBy((val, key) => key.toUpperCase() === key)({a: 1, b: 2, A: 3, B: 4}) // => {a: 1, b: 2}
|
|
18
|
-
* @dataLast
|
|
19
|
-
* @category Object
|
|
20
|
-
*/
|
|
21
|
-
export declare function omitBy<T>(fn: <K extends keyof T>(value: T[K], key: K) => boolean): (object: T) => T extends Record<keyof T, T[keyof T]> ? T : Partial<T>;
|
|
22
|
-
//# sourceMappingURL=omit-by.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"omit-by.d.ts","sourceRoot":"","sources":["../../../src/object/omit-by.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,GACtD,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAE1D;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,EAAE,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,GACtD,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a partial copy of an object omitting the keys specified.
|
|
3
|
-
* @param propNames the property names
|
|
4
|
-
* @signature
|
|
5
|
-
* P.omit(propNames)(obj);
|
|
6
|
-
* @example
|
|
7
|
-
* P.pipe({ a: 1, b: 2, c: 3, d: 4 }, P.omit(['a', 'd'])) // => { b: 2, c: 3 }
|
|
8
|
-
* @dataLast
|
|
9
|
-
* @category Object
|
|
10
|
-
*/
|
|
11
|
-
export declare function omit<T extends object, K extends keyof T>(propNames: ReadonlyArray<K>): (data: T) => Omit<T, K>;
|
|
12
|
-
/**
|
|
13
|
-
* Returns a partial copy of an object omitting the keys specified.
|
|
14
|
-
* @param data the object
|
|
15
|
-
* @param propNames the property names
|
|
16
|
-
* @signature
|
|
17
|
-
* P.omit(obj, names);
|
|
18
|
-
* @example
|
|
19
|
-
* P.omit({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'd']) // => { b: 2, c: 3 }
|
|
20
|
-
* @dataFirst
|
|
21
|
-
* @category Object
|
|
22
|
-
*/
|
|
23
|
-
export declare function omit<T extends object, K extends keyof T>(data: T, propNames: ReadonlyArray<K>): Omit<T, K>;
|
|
24
|
-
//# sourceMappingURL=omit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"omit.d.ts","sourceRoot":"","sources":["../../../src/object/omit.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EACtD,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,GAC1B,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EACtD,IAAI,EAAE,CAAC,EACP,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,GAC1B,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Given a union of indexable types `T`, we derive an indexable type
|
|
3
|
-
* containing all of the keys of each variant of `T`. If a key is
|
|
4
|
-
* present in multiple variants of `T`, then the corresponding type in
|
|
5
|
-
* `Pathable<T>` will be the intersection of all types for that key.
|
|
6
|
-
* @example
|
|
7
|
-
* type T1 = Pathable<{a: number} | {a: string; b: boolean}>
|
|
8
|
-
* // {a: number | string; b: boolean}
|
|
9
|
-
*
|
|
10
|
-
* type T2 = Pathable<{a?: {b: string}}
|
|
11
|
-
* // {a: {b: string} | undefined}
|
|
12
|
-
*
|
|
13
|
-
* type T3 = Pathable<{a: string} | number>
|
|
14
|
-
* // {a: string}
|
|
15
|
-
*
|
|
16
|
-
* type T4 = Pathable<{a: number} | {a: string} | {b: boolean}>
|
|
17
|
-
* // {a: number | string; b: boolean}
|
|
18
|
-
*
|
|
19
|
-
* This type lets us answer the questions:
|
|
20
|
-
* - Given some object of type `T`, what keys might this object have?
|
|
21
|
-
* - If this object did happen to have a particular key, what values
|
|
22
|
-
* might that key have?
|
|
23
|
-
*/
|
|
24
|
-
type Pathable<T> = {
|
|
25
|
-
[K in AllKeys<T>]: TypesForKey<T, K>;
|
|
26
|
-
};
|
|
27
|
-
type AllKeys<T> = T extends infer I ? keyof I : never;
|
|
28
|
-
type TypesForKey<T, K extends PropertyKey> = T extends infer I ? K extends keyof I ? I[K] : never : never;
|
|
29
|
-
type StrictlyRequired<T> = {
|
|
30
|
-
[K in keyof T]-?: NonNullable<T[K]>;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Given some `A` which is a key of at least one variant of `T`, derive
|
|
34
|
-
* `T[A]` for the cases where `A` is present in `T`, and `T[A]` is not
|
|
35
|
-
* null or undefined.
|
|
36
|
-
*/
|
|
37
|
-
type PathValue1<T, A extends keyof Pathable<T>> = StrictlyRequired<Pathable<T>>[A];
|
|
38
|
-
/** All possible options after successfully reaching `T[A]` */
|
|
39
|
-
type Pathable1<T, A extends keyof Pathable<T>> = Pathable<PathValue1<T, A>>;
|
|
40
|
-
/** As `PathValue1`, but for `T[A][B]` */
|
|
41
|
-
type PathValue2<T, A extends keyof Pathable<T>, B extends keyof Pathable1<T, A>> = StrictlyRequired<Pathable1<T, A>>[B];
|
|
42
|
-
/** As `Pathable1`, but for `T[A][B]` */
|
|
43
|
-
type Pathable2<T, A extends keyof Pathable<T>, B extends keyof Pathable1<T, A>> = Pathable<PathValue2<T, A, B>>;
|
|
44
|
-
/** As `PathValue1`, but for `T[A][B][C]` */
|
|
45
|
-
type PathValue3<T, A extends keyof Pathable<T>, B extends keyof Pathable1<T, A>, C extends keyof Pathable2<T, A, B>> = StrictlyRequired<Pathable2<T, A, B>>[C];
|
|
46
|
-
/**
|
|
47
|
-
* Gets the value at `path` of `object`. If the resolved value is `undefined`, the `defaultValue` is returned in its place.
|
|
48
|
-
*
|
|
49
|
-
* @param object the target object
|
|
50
|
-
* @param path the path of the property to get
|
|
51
|
-
* @param defaultValue the default value
|
|
52
|
-
* @signature P.pathOr(object, array, defaultValue)
|
|
53
|
-
* @example
|
|
54
|
-
* P.pathOr({x: 10}, ['y'], 2) // 2
|
|
55
|
-
* P.pathOr({y: 10}, ['y'], 2) // 10
|
|
56
|
-
* @dataFirst
|
|
57
|
-
* @category Object
|
|
58
|
-
*/
|
|
59
|
-
export declare function pathOr<T, A extends keyof Pathable<T>>(object: T, path: readonly [A], defaultValue: PathValue1<T, A>): PathValue1<T, A>;
|
|
60
|
-
export declare function pathOr<T, A extends keyof Pathable<T>, B extends keyof Pathable1<T, A>>(object: T, path: readonly [A, B], defaultValue: PathValue2<T, A, B>): PathValue2<T, A, B>;
|
|
61
|
-
export declare function pathOr<T, A extends keyof Pathable<T>, B extends keyof Pathable1<T, A>, C extends keyof Pathable2<T, A, B>>(object: T, path: readonly [A, B, C], defaultValue: PathValue3<T, A, B, C>): PathValue3<T, A, B, C>;
|
|
62
|
-
/**
|
|
63
|
-
* Gets the value at `path` of `object`. If the resolved value is `undefined`, the `defaultValue` is returned in its place.
|
|
64
|
-
*
|
|
65
|
-
* @param path the path of the property to get
|
|
66
|
-
* @param defaultValue the default value
|
|
67
|
-
* @signature P.pathOr(array, defaultValue)(object)
|
|
68
|
-
* @example
|
|
69
|
-
* P.pipe({x: 10}, P.pathOr(['y'], 2)) // 2
|
|
70
|
-
* P.pipe({y: 10}, P.pathOr(['y'], 2)) // 10
|
|
71
|
-
* @dataLast
|
|
72
|
-
* @category Object
|
|
73
|
-
*/
|
|
74
|
-
export declare function pathOr<T, A extends keyof Pathable<T>>(path: readonly [A], defaultValue: PathValue1<T, A>): (object: T) => PathValue1<T, A>;
|
|
75
|
-
export declare function pathOr<T, A extends keyof Pathable<T>, B extends keyof Pathable1<T, A>>(path: readonly [A, B], defaultValue: PathValue2<T, A, B>): (object: T) => PathValue2<T, A, B>;
|
|
76
|
-
export declare function pathOr<T, A extends keyof Pathable<T>, B extends keyof Pathable1<T, A>, C extends keyof Pathable2<T, A, B>>(path: readonly [A, B, C], defaultValue: PathValue3<T, A, B, C>): (object: T) => PathValue3<T, A, B, C>;
|
|
77
|
-
export {};
|
|
78
|
-
//# sourceMappingURL=path-or.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-or.d.ts","sourceRoot":"","sources":["../../../src/object/path-or.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates an object composed of the picked `object` properties.
|
|
3
|
-
*
|
|
4
|
-
* @param object the target object
|
|
5
|
-
* @param fn the predicate
|
|
6
|
-
* @signature P.pickBy(object, fn)
|
|
7
|
-
* @example
|
|
8
|
-
* P.pickBy({a: 1, b: 2, A: 3, B: 4}, (val, key) => key.toUpperCase() === key) // => {A: 3, B: 4}
|
|
9
|
-
* @dataFirst
|
|
10
|
-
* @category Object
|
|
11
|
-
*/
|
|
12
|
-
export declare function pickBy<T>(object: T, fn: <K extends keyof T>(value: T[K], key: K) => boolean): T extends Record<keyof T, T[keyof T]> ? T : Partial<T>;
|
|
13
|
-
/**
|
|
14
|
-
* Creates an object composed of the picked `object` properties.
|
|
15
|
-
*
|
|
16
|
-
* @param fn the predicate
|
|
17
|
-
* @signature P.pickBy(fn)(object)
|
|
18
|
-
* @example
|
|
19
|
-
* P.pickBy((val, key) => key.toUpperCase() === key)({a: 1, b: 2, A: 3, B: 4}) // => {A: 3, B: 4}
|
|
20
|
-
* @dataLast
|
|
21
|
-
* @category Object
|
|
22
|
-
*/
|
|
23
|
-
export declare function pickBy<T>(fn: <K extends keyof T>(value: T[K], key: K) => boolean): (object: T) => T extends Record<keyof T, T[keyof T]> ? T : Partial<T>;
|
|
24
|
-
//# sourceMappingURL=pick-by.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pick-by.d.ts","sourceRoot":"","sources":["../../../src/object/pick-by.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,GACtD,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAE1D;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,EAAE,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,GACtD,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates an object composed of the picked `object` properties.
|
|
3
|
-
* @param names the properties names
|
|
4
|
-
* @signature P.pick([prop1, prop2])(object)
|
|
5
|
-
* @example
|
|
6
|
-
* P.pipe({ a: 1, b: 2, c: 3, d: 4 }, P.pick(['a', 'd'])) // => { a: 1, d: 4 }
|
|
7
|
-
* @dataLast
|
|
8
|
-
* @category Object
|
|
9
|
-
*/
|
|
10
|
-
export declare function pick<T extends object, K extends keyof T>(names: ReadonlyArray<K>): (object: T) => Pick<T, K>;
|
|
11
|
-
/**
|
|
12
|
-
* Creates an object composed of the picked `object` properties.
|
|
13
|
-
* @param object the target object
|
|
14
|
-
* @param names the properties names
|
|
15
|
-
* @signature P.pick(object, [prop1, prop2])
|
|
16
|
-
* @example
|
|
17
|
-
* P.pick({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'd']) // => { a: 1, d: 4 }
|
|
18
|
-
* @dataFirst
|
|
19
|
-
* @category Object
|
|
20
|
-
*/
|
|
21
|
-
export declare function pick<T extends object, K extends keyof T>(object: T, names: ReadonlyArray<K>): Pick<T, K>;
|
|
22
|
-
//# sourceMappingURL=pick.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pick.d.ts","sourceRoot":"","sources":["../../../src/object/pick.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EACtD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE7B;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EACtD,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|