@vinicunca/perkakas 0.4.1 → 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/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 -20
- 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 -16
- 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,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"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets the value of the given property.
|
|
3
|
-
* @param propName the property name
|
|
4
|
-
* @signature P.prop(prop)(object)
|
|
5
|
-
* @example
|
|
6
|
-
* P.pipe({foo: 'bar'}, P.prop('foo')) // => 'bar'
|
|
7
|
-
* @dataLast
|
|
8
|
-
* @category Object
|
|
9
|
-
*/
|
|
10
|
-
export declare function prop<T, K extends keyof T>(propName: K): ({ [propName]: value }: T) => T[K];
|
|
11
|
-
//# sourceMappingURL=prop.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prop.d.ts","sourceRoot":"","sources":["../../../src/object/prop.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,2BACrB,CAAC,KAAG,CAAC,CAAC,CAAC,CAAC,CACxC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Narrow } from '../utils/narrow';
|
|
2
|
-
import type { Path, SupportsValueAtPath, ValueAtPath } from '../utils/paths';
|
|
3
|
-
/**
|
|
4
|
-
* Sets the value at `path` of `object`. `path` can be an array or a path string.
|
|
5
|
-
*
|
|
6
|
-
* @param object the target method
|
|
7
|
-
* @param path the property name
|
|
8
|
-
* @param value the value to set
|
|
9
|
-
* @signature
|
|
10
|
-
* P.setPath(obj, path, value)
|
|
11
|
-
* @example
|
|
12
|
-
* P.setPath({ a: { b: 1 } }, ['a', 'b'], 2) // => { a: { b: 2 } }
|
|
13
|
-
* @dataFirst
|
|
14
|
-
* @category Object
|
|
15
|
-
*/
|
|
16
|
-
export declare function setPath<T, TPath extends Array<PropertyKey> & Path<T>>(object: T, path: Narrow<TPath>, value: ValueAtPath<T, TPath>): T;
|
|
17
|
-
/**
|
|
18
|
-
* Sets the value at `path` of `object`. `path` can be an array or a path string.
|
|
19
|
-
*
|
|
20
|
-
* @param path the property name
|
|
21
|
-
* @param value the value to set
|
|
22
|
-
* @signature
|
|
23
|
-
* P.setPath(path, value)
|
|
24
|
-
* @example
|
|
25
|
-
* P.pipe({ a: { b: 1 } }, P.setPath(['a', 'b'], 2)) // { a: { b: 2 } }
|
|
26
|
-
* @dataFirst
|
|
27
|
-
* @category Object
|
|
28
|
-
*/
|
|
29
|
-
export declare function setPath<TPath extends Array<PropertyKey>, Value>(path: Narrow<TPath>, value: Value): <Obj>(object: SupportsValueAtPath<Obj, TPath, Value>) => Obj;
|
|
30
|
-
export declare function setPath_(data: unknown, path: ReadonlyArray<PropertyKey>, value: unknown): unknown;
|
|
31
|
-
//# sourceMappingURL=set-path.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-path.d.ts","sourceRoot":"","sources":["../../../src/object/set-path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7E;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,SAAS,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,EACnE,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,EACnB,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC,GAC3B,CAAC,CAAC;AAEL;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,KAAK,SAAS,KAAK,CAAC,WAAW,CAAC,EAAE,KAAK,EAC7D,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,EACnB,KAAK,EAAE,KAAK,GACX,CAAC,GAAG,EAAE,MAAM,EAAE,mBAAmB,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,CAAC;AAMhE,wBAAgB,QAAQ,CACtB,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,KAAK,EAAE,OAAO,GACb,OAAO,CAuBT"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sets the `value` at `prop` of `object`.
|
|
3
|
-
* @param obj the target method
|
|
4
|
-
* @param prop the property name
|
|
5
|
-
* @param value the value to set
|
|
6
|
-
* @signature
|
|
7
|
-
* P.set(obj, prop, value)
|
|
8
|
-
* @example
|
|
9
|
-
* P.set({ a: 1 }, 'a', 2) // => { a: 2 }
|
|
10
|
-
* @dataFirst
|
|
11
|
-
* @category Object
|
|
12
|
-
*/
|
|
13
|
-
export declare function set<T, K extends keyof T>(obj: T, prop: K, value: T[K]): T;
|
|
14
|
-
/**
|
|
15
|
-
* Sets the `value` at `prop` of `object`.
|
|
16
|
-
* @param prop the property name
|
|
17
|
-
* @param value the value to set
|
|
18
|
-
* @signature
|
|
19
|
-
* P.set(prop, value)(obj)
|
|
20
|
-
* @example
|
|
21
|
-
* P.pipe({ a: 1 }, P.set('a', 2)) // => { a: 2 }
|
|
22
|
-
* @dataLast
|
|
23
|
-
* @category Object
|
|
24
|
-
*/
|
|
25
|
-
export declare function set<T, K extends keyof T>(prop: K, value: T[K]): (obj: T) => T;
|
|
26
|
-
//# sourceMappingURL=set.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../src/object/set.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
type SwappedProps<T, K1 extends keyof T, K2 extends keyof T> = {
|
|
2
|
-
[K in keyof T]: T[K1 extends K ? K2 : K2 extends K ? K1 : K];
|
|
3
|
-
};
|
|
4
|
-
/**
|
|
5
|
-
* Swaps the positions of two properties in an object based on the provided keys.
|
|
6
|
-
*
|
|
7
|
-
* @param data the object to be manipulated
|
|
8
|
-
* @param key1 the first property key
|
|
9
|
-
* @param key2 the second property key
|
|
10
|
-
*
|
|
11
|
-
* @signature
|
|
12
|
-
* swap(data, key1, key2)
|
|
13
|
-
*
|
|
14
|
-
* @returns Returns the manipulated object.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* swap({a: 1, b: 2, c: 3}, 'a', 'b') // => {a: 2, b: 1, c: 3}
|
|
18
|
-
*
|
|
19
|
-
* @category Object
|
|
20
|
-
*
|
|
21
|
-
* @dataFirst
|
|
22
|
-
*/
|
|
23
|
-
export declare function swapProps<T extends object, K1 extends keyof T, K2 extends keyof T>(data: T, key1: K1, key2: K2): SwappedProps<T, K1, K2>;
|
|
24
|
-
/**
|
|
25
|
-
* Swaps the positions of two properties in an object based on the provided keys.
|
|
26
|
-
*
|
|
27
|
-
* @param key1 the first property key
|
|
28
|
-
* @param key2 the second property key
|
|
29
|
-
*
|
|
30
|
-
* @signature
|
|
31
|
-
* swap(key1, key2)(data)
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* swap('a', 'b')({a: 1, b: 2, c: 3}) // => {a: 2, b: 1, c: 3}
|
|
35
|
-
*
|
|
36
|
-
* @returns Returns the manipulated object.
|
|
37
|
-
*
|
|
38
|
-
* @category Object
|
|
39
|
-
*
|
|
40
|
-
* @dataLast
|
|
41
|
-
*/
|
|
42
|
-
export declare function swapProps<T extends object, K1 extends keyof T, K2 extends keyof T>(key1: K1, key2: K2): (data: T) => SwappedProps<T, K1, K2>;
|
|
43
|
-
export {};
|
|
44
|
-
//# sourceMappingURL=swap-props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"swap-props.d.ts","sourceRoot":"","sources":["../../../src/object/swap-props.ts"],"names":[],"mappings":"AAEA,KAAK,YAAY,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,IAAI;KAC5D,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;CAC7D,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CACvB,CAAC,SAAS,MAAM,EAChB,EAAE,SAAS,MAAM,CAAC,EAClB,EAAE,SAAS,MAAM,CAAC,EAClB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAExD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CACvB,CAAC,SAAS,MAAM,EAChB,EAAE,SAAS,MAAM,CAAC,EAClB,EAAE,SAAS,MAAM,CAAC,EAClB,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns an array of key/values of the enumerable properties of an object.
|
|
3
|
-
* @param object
|
|
4
|
-
* @signature
|
|
5
|
-
* P.toPairs(object)
|
|
6
|
-
* P.toPairs.strict(object)
|
|
7
|
-
* @example
|
|
8
|
-
* P.toPairs({ a: 1, b: 2, c: 3 }) // => [['a', 1], ['b', 2], ['c', 3]]
|
|
9
|
-
* P.toPairs.strict({ a: 1 } as const) // => [['a', 1]] typed Array<['a', 1]>
|
|
10
|
-
* P.pipe(
|
|
11
|
-
* { a: 1, b: 2, c: 3 },
|
|
12
|
-
* toPairs,
|
|
13
|
-
* ); // => [['a', 1], ['b', 2], ['c', 3]]
|
|
14
|
-
* P.pipe(
|
|
15
|
-
* { a: 1 } as const,
|
|
16
|
-
* toPairs.strict,
|
|
17
|
-
* ); // => [['a', 1]] typed Array<['a', 1]>
|
|
18
|
-
* @strict
|
|
19
|
-
* @category Object
|
|
20
|
-
* @dataFirst
|
|
21
|
-
*/
|
|
22
|
-
export declare function toPairs<T>(object: Readonly<Record<string, T>>): Array<[string, T]>;
|
|
23
|
-
type Pairs<T> = Array<{
|
|
24
|
-
[K in keyof T]-?: [key: K, value: Required<T>[K]];
|
|
25
|
-
}[keyof T]>;
|
|
26
|
-
interface Strict {
|
|
27
|
-
<T extends NonNullable<unknown>>(object: T): Pairs<T>;
|
|
28
|
-
}
|
|
29
|
-
export declare namespace toPairs {
|
|
30
|
-
const strict: Strict;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
33
|
-
//# sourceMappingURL=to-pairs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"to-pairs.d.ts","sourceRoot":"","sources":["../../../src/object/to-pairs.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACvB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAClC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AA4BtB,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,CACnB;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,CAAC,CAAC,CAC/D,CAAC;AAEF,UAAU,MAAM;IACd,CAAC,CAAC,SAAS,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;CAGvD;AAED,yBAAiB,OAAO,CAAC;IAChB,MAAM,MAAM,QAAoB,CAAC;CACzC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a new array containing the values of the array or object.
|
|
3
|
-
*
|
|
4
|
-
* @param source Either an array or an object
|
|
5
|
-
* @signature
|
|
6
|
-
* P.values(source)
|
|
7
|
-
* @example
|
|
8
|
-
* P.values(['x', 'y', 'z']) // => ['x', 'y', 'z']
|
|
9
|
-
* P.values({ a: 'x', b: 'y', c: 'z' }) // => ['x', 'y', 'z']
|
|
10
|
-
* P.pipe(
|
|
11
|
-
* { a: 'x', b: 'y', c: 'z' },
|
|
12
|
-
* P.values,
|
|
13
|
-
* P.first
|
|
14
|
-
* ) // => 'x'
|
|
15
|
-
* @pipeable
|
|
16
|
-
* @category Object
|
|
17
|
-
*/
|
|
18
|
-
type Values<T extends object> = T extends [] | ReadonlyArray<unknown> ? Array<T[number]> : Array<T[keyof T]>;
|
|
19
|
-
export declare function values<T extends object>(source: T): Values<T>;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=values.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../../src/object/values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,KAAK,MAAM,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,EAAE,GAAG,aAAa,CAAC,OAAO,CAAC,GACjE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAChB,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAEtB,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAE7D"}
|