@vinicunca/perkakas 0.4.1 → 0.4.4
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 +4609 -0
- package/dist/index.d.mts +4609 -0
- package/dist/index.d.ts +4609 -0
- package/dist/index.mjs +2231 -0
- package/dist/metadata.json +8 -8
- 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,54 +0,0 @@
|
|
|
1
|
-
import type { IterableContainer } from '../utils/types';
|
|
2
|
-
/**
|
|
3
|
-
* Checks if the item is included in the container. This is a wrapper around
|
|
4
|
-
* `Array.prototype.includes` and `Set.prototype.has` and thus relies on the
|
|
5
|
-
* same equality checks that those functions do (which is reference equality,
|
|
6
|
-
* e.g. `===`). The input's type is narrowed to the container's type if
|
|
7
|
-
* possible.
|
|
8
|
-
*
|
|
9
|
-
* Notice that unlike most functions, this function takes a generic item as it's
|
|
10
|
-
* data and **an array** as it's parameter.
|
|
11
|
-
*
|
|
12
|
-
* @param data - The item that is checked.
|
|
13
|
-
* @param container - The items that are checked against.
|
|
14
|
-
* @returns A narrowed version of the input data on success, `false` otherwise.
|
|
15
|
-
* @signature
|
|
16
|
-
* P.isIncludedIn(data, container);
|
|
17
|
-
* @example
|
|
18
|
-
* P.isIncludedIn(2, [1, 2, 3]); // => true
|
|
19
|
-
* P.isIncludedIn(4, [1, 2, 3]); // => false
|
|
20
|
-
*
|
|
21
|
-
* const data = "cat" as "cat" | "dog" | "mouse";
|
|
22
|
-
* P.isIncludedIn(data, ["cat", "dog"] as const); // true (typed "cat" | "dog");
|
|
23
|
-
* @dataFirst
|
|
24
|
-
* @category Guard
|
|
25
|
-
*/
|
|
26
|
-
export declare function isIncludedIn<T, S extends T>(data: T, container: IterableContainer<S>): data is S;
|
|
27
|
-
/**
|
|
28
|
-
* Checks if the item is included in the container. This is a wrapper around
|
|
29
|
-
* `Array.prototype.includes` and `Set.prototype.has` and thus relies on the
|
|
30
|
-
* same equality checks that those functions do (which is reference equality,
|
|
31
|
-
* e.g. `===`). The input's type is narrowed to the container's type if
|
|
32
|
-
* possible.
|
|
33
|
-
*
|
|
34
|
-
* Notice that unlike most functions, this function takes a generic item as it's
|
|
35
|
-
* data and **an array** as it's parameter.
|
|
36
|
-
*
|
|
37
|
-
* @param container - The items that are checked against.
|
|
38
|
-
* @returns A narrowed version of the input data on success, `false` otherwise.
|
|
39
|
-
* @signature
|
|
40
|
-
* P.isIncludedIn(container)(data);
|
|
41
|
-
* @example
|
|
42
|
-
* P.pipe(2, P.isIncludedIn([1, 2, 3])); // => true
|
|
43
|
-
* P.pipe(4, P.isIncludedIn([1, 2, 3])); // => false
|
|
44
|
-
*
|
|
45
|
-
* const data = "cat" as "cat" | "dog" | "mouse";
|
|
46
|
-
* P.pipe(
|
|
47
|
-
* data,
|
|
48
|
-
* P.isIncludedIn(["cat", "dog"] as const),
|
|
49
|
-
* ); // => true (typed "cat" | "dog");
|
|
50
|
-
* @dataLast
|
|
51
|
-
* @category Guard
|
|
52
|
-
*/
|
|
53
|
-
export declare function isIncludedIn<T, S extends T>(container: IterableContainer<S>): (data: T) => data is S;
|
|
54
|
-
//# sourceMappingURL=is-included-in.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-included-in.d.ts","sourceRoot":"","sources":["../../../src/guard/is-included-in.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACzC,IAAI,EAAE,CAAC,EACP,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC9B,IAAI,IAAI,CAAC,CAAC;AAEb;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACzC,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC9B,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A function that checks if the passed parameter is Nil (null or undefined) and narrows its type accordingly
|
|
3
|
-
* @param data the variable to check
|
|
4
|
-
* @signature
|
|
5
|
-
* P.isNil(data)
|
|
6
|
-
* @returns true if the passed input is Nil (null or undefined), false otherwise
|
|
7
|
-
* @example
|
|
8
|
-
* P.isNil(undefined) //=> true
|
|
9
|
-
* P.isNil(null) //=> true
|
|
10
|
-
* P.isNil('somethingElse') //=> false
|
|
11
|
-
* @category Guard
|
|
12
|
-
*/
|
|
13
|
-
export declare function isNil<T>(data: T): data is Extract<T, null | undefined>;
|
|
14
|
-
//# sourceMappingURL=is-nil.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-nil.d.ts","sourceRoot":"","sources":["../../../src/guard/is-nil.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC,CAEtE"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A function that checks if the passed parameter is not `null` and narrows its type accordingly.
|
|
3
|
-
* Notice that `undefined` is not null!
|
|
4
|
-
* @param data the variable to check
|
|
5
|
-
* @signature
|
|
6
|
-
* P.isNonNull(data)
|
|
7
|
-
* @returns true if the passed input is defined, false otherwise
|
|
8
|
-
* @example
|
|
9
|
-
* P.isNonNull('string') //=> true
|
|
10
|
-
* P.isNonNull(null) //=> false
|
|
11
|
-
* P.isNonNull(undefined) //=> true
|
|
12
|
-
* @category Guard
|
|
13
|
-
*/
|
|
14
|
-
export declare function isNonNull<T>(data: T | null): data is T;
|
|
15
|
-
//# sourceMappingURL=is-non-null.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-non-null.d.ts","sourceRoot":"","sources":["../../../src/guard/is-non-null.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI,IAAI,CAAC,CAEtD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A function that takes a guard function as predicate and returns a guard that negates it
|
|
3
|
-
* @param predicate the guard function to negate
|
|
4
|
-
* @signature
|
|
5
|
-
* P.isNot(P.isTruthy)(data)
|
|
6
|
-
* @returns function A guard function
|
|
7
|
-
* @example
|
|
8
|
-
* P.isNot(P.isTruthy)(false) //=> true
|
|
9
|
-
* P.isNot(P.isTruthy)(true) //=> false
|
|
10
|
-
* @dataLast
|
|
11
|
-
* @category Guard
|
|
12
|
-
*/
|
|
13
|
-
export declare function isNot<T, S extends T>(predicate: (data: T) => data is S): (data: T) => data is Exclude<T, S>;
|
|
14
|
-
export declare function isNot<T>(predicate: (data: T) => boolean): (data: T) => boolean;
|
|
15
|
-
//# sourceMappingURL=is-not.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-not.d.ts","sourceRoot":"","sources":["../../../src/guard/is-not.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAClC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,GAChC,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtC,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { NarrowedTo } from '../utils/types';
|
|
2
|
-
/**
|
|
3
|
-
* A function that checks if the passed parameter is a number and narrows its type accordingly
|
|
4
|
-
* @param data the variable to check
|
|
5
|
-
* @signature
|
|
6
|
-
* P.isNumber(data)
|
|
7
|
-
* @returns true if the passed input is a number, false otherwise
|
|
8
|
-
* @example
|
|
9
|
-
* P.isNumber(1) //=> true
|
|
10
|
-
* P.isNumber('notANumber') //=> false
|
|
11
|
-
* @category Guard
|
|
12
|
-
*/
|
|
13
|
-
export declare function isNumber<T>(data: T | number): data is NarrowedTo<T, number>;
|
|
14
|
-
//# sourceMappingURL=is-number.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-number.d.ts","sourceRoot":"","sources":["../../../src/guard/is-number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,IAAI,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,CAE3E"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { NarrowedTo } from '../utils/types';
|
|
2
|
-
/**
|
|
3
|
-
* Checks if `data` is a "plain" object. A plain object is defined as an object with string keys and values of any type, including primitives, other objects, functions, classes, etc (aka struct/shape/record/simple). Technically, a plain object is one whose prototype is either `Object.prototype` or `null`, ensuring it does not inherit properties or methods from other object types.
|
|
4
|
-
*
|
|
5
|
-
* This function is narrower in scope than `isObjectType`, which accepts any entity considered an `"object"` by JavaScript's `typeof`.
|
|
6
|
-
*
|
|
7
|
-
* Note that Maps, Arrays, and Sets are not considered plain objects and would return `false`.
|
|
8
|
-
*
|
|
9
|
-
* @param data - The variable to check.
|
|
10
|
-
* @returns - The input type, narrowed to only plain objects.
|
|
11
|
-
* @signature
|
|
12
|
-
* P.isObject(data)
|
|
13
|
-
* @example
|
|
14
|
-
* // true
|
|
15
|
-
* P.isObject({}) //=> true
|
|
16
|
-
* P.isObject({ a: 123 }) //=> true
|
|
17
|
-
*
|
|
18
|
-
* // false
|
|
19
|
-
* P.isObject([]) //=> false
|
|
20
|
-
* P.isObject(Promise.resolve("something")) //=> false
|
|
21
|
-
* P.isObject(new Date()) //=> false
|
|
22
|
-
* P.isObject(new Error("error")) //=> false
|
|
23
|
-
* P.isObject('somethingElse') //=> false
|
|
24
|
-
* P.isObject(null) //=> false
|
|
25
|
-
* @category Guard
|
|
26
|
-
*/
|
|
27
|
-
export declare function isObject<T>(data: Readonly<Record<PropertyKey, unknown>> | T): data is NarrowedTo<T, Record<PropertyKey, unknown>>;
|
|
28
|
-
//# sourceMappingURL=is-object.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-object.d.ts","sourceRoot":"","sources":["../../../src/guard/is-object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,GAC/C,IAAI,IAAI,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAOrD"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A function that checks if the passed parameter is a Promise and narrows its type accordingly
|
|
3
|
-
* @param data the variable to check
|
|
4
|
-
* @signature
|
|
5
|
-
* P.isPromise(data)
|
|
6
|
-
* @returns true if the passed input is a Promise, false otherwise
|
|
7
|
-
* @example
|
|
8
|
-
* P.isPromise(Promise.resolve(5)) //=> true
|
|
9
|
-
* P.isPromise(Promise.reject(5)) //=> true
|
|
10
|
-
* P.isPromise('somethingElse') //=> false
|
|
11
|
-
* @category Guard
|
|
12
|
-
*/
|
|
13
|
-
export declare function isPromise<T, S>(data: Promise<T> | S): data is Promise<T>;
|
|
14
|
-
//# sourceMappingURL=is-promise.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-promise.d.ts","sourceRoot":"","sources":["../../../src/guard/is-promise.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,CAExE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { NarrowedTo } from '../utils/types';
|
|
2
|
-
/**
|
|
3
|
-
* A function that checks if the passed parameter is a string and narrows its type accordingly
|
|
4
|
-
* @param data the variable to check
|
|
5
|
-
* @signature
|
|
6
|
-
* P.isString(data)
|
|
7
|
-
* @returns true if the passed input is a string, false otherwise
|
|
8
|
-
* @example
|
|
9
|
-
* P.isString('string') //=> true
|
|
10
|
-
* P.isString(1) //=> false
|
|
11
|
-
* @category Guard
|
|
12
|
-
*/
|
|
13
|
-
export declare function isString<T>(data: T | string): data is NarrowedTo<T, string>;
|
|
14
|
-
//# sourceMappingURL=is-string.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-string.d.ts","sourceRoot":"","sources":["../../../src/guard/is-string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,IAAI,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,CAE3E"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { NarrowedTo } from '../utils/types';
|
|
2
|
-
/**
|
|
3
|
-
* A function that checks if the passed parameter is a symbol and narrows its type accordingly
|
|
4
|
-
* @param data the variable to check
|
|
5
|
-
* @signature
|
|
6
|
-
* P.isSymbol(data)
|
|
7
|
-
* @returns true if the passed input is a symbol, false otherwise
|
|
8
|
-
* @example
|
|
9
|
-
* P.isSymbol(Symbol('foo')) //=> true
|
|
10
|
-
* P.isSymbol(1) //=> false
|
|
11
|
-
* @category Guard
|
|
12
|
-
*/
|
|
13
|
-
export declare function isSymbol<T>(data: T | symbol): data is NarrowedTo<T, symbol>;
|
|
14
|
-
//# sourceMappingURL=is-symbol.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-symbol.d.ts","sourceRoot":"","sources":["../../../src/guard/is-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,IAAI,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,CAE3E"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A function that checks if the passed parameter is truthy and narrows its type accordingly
|
|
3
|
-
* @param data the variable to check
|
|
4
|
-
* @signature
|
|
5
|
-
* P.isTruthy(data)
|
|
6
|
-
* @returns true if the passed input is truthy, false otherwise
|
|
7
|
-
* @example
|
|
8
|
-
* P.isTruthy('somethingElse') //=> true
|
|
9
|
-
* P.isTruthy(null) //=> false
|
|
10
|
-
* P.isTruthy(undefined) //=> false
|
|
11
|
-
* P.isTruthy(false) //=> false
|
|
12
|
-
* P.isTruthy(0) //=> false
|
|
13
|
-
* P.isTruthy('') //=> false
|
|
14
|
-
* @category Guard
|
|
15
|
-
*/
|
|
16
|
-
export declare function isTruthy<T>(data: T): data is Exclude<T, '' | 0 | false | null | undefined>;
|
|
17
|
-
//# sourceMappingURL=is-truthy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-truthy.d.ts","sourceRoot":"","sources":["../../../src/guard/is-truthy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,CAAC,GACN,IAAI,IAAI,OAAO,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,CAEvD"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './aria';
|
|
2
|
-
export * from './array';
|
|
3
|
-
export * from './function';
|
|
4
|
-
export * from './guard';
|
|
5
|
-
export * from './number';
|
|
6
|
-
export * from './object';
|
|
7
|
-
export * from './string';
|
|
8
|
-
export * from './type';
|
|
9
|
-
export declare const isBrowser: boolean;
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AAEvB,eAAO,MAAM,SAAS,SAAgC,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds two numbers.
|
|
3
|
-
* @param value The number.
|
|
4
|
-
* @param addend The number to add to the value.
|
|
5
|
-
* @signature
|
|
6
|
-
* P.add(value, addend);
|
|
7
|
-
* @example
|
|
8
|
-
* P.add(10, 5) // => 15
|
|
9
|
-
* P.add(10, -5) // => 5
|
|
10
|
-
* P.reduce([1, 2, 3, 4], P.add, 0) // => 10
|
|
11
|
-
* @dataFirst
|
|
12
|
-
* @category Number
|
|
13
|
-
*/
|
|
14
|
-
export declare function add(value: number, addend: number): number;
|
|
15
|
-
/**
|
|
16
|
-
* Adds two numbers.
|
|
17
|
-
* @param addend The number to add to the value.
|
|
18
|
-
* @signature
|
|
19
|
-
* P.add(addend)(value);
|
|
20
|
-
* @example
|
|
21
|
-
* P.add(5)(10) // => 15
|
|
22
|
-
* P.add(-5)(10) // => 5
|
|
23
|
-
* P.map([1, 2, 3, 4], P.add(1)) // => [2, 3, 4, 5]
|
|
24
|
-
* @dataLast
|
|
25
|
-
* @category Number
|
|
26
|
-
*/
|
|
27
|
-
export declare function add(addend: number): (value: number) => number;
|
|
28
|
-
//# sourceMappingURL=add.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/number/add.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;AAE3D;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rounds up a given number to a specific precision.
|
|
3
|
-
* If you'd like to round up to an integer (i.e. use this function with constant `precision === 0`),
|
|
4
|
-
* use `Math.ceil` instead, as it won't incur the additional library overhead.
|
|
5
|
-
*
|
|
6
|
-
* @param value The number to round up.
|
|
7
|
-
* @param precision The precision to round up to. Must be an integer between -15 and 15.
|
|
8
|
-
* @signature
|
|
9
|
-
* P.ceil(value, precision);
|
|
10
|
-
* @example
|
|
11
|
-
* P.ceil(123.9876, 3) // => 123.988
|
|
12
|
-
* P.ceil(483.22243, 1) // => 483.3
|
|
13
|
-
* P.ceil(8541, -1) // => 8550
|
|
14
|
-
* P.ceil(456789, -3) // => 457000
|
|
15
|
-
* @dataFirst
|
|
16
|
-
* @category Number
|
|
17
|
-
*/
|
|
18
|
-
export declare function ceil(value: number, precision: number): number;
|
|
19
|
-
/**
|
|
20
|
-
* Rounds up a given number to a specific precision.
|
|
21
|
-
* If you'd like to round up to an integer (i.e. use this function with constant `precision === 0`),
|
|
22
|
-
* use `Math.ceil` instead, as it won't incur the additional library overhead.
|
|
23
|
-
*
|
|
24
|
-
* @param precision The precision to round up to. Must be an integer between -15 and 15.
|
|
25
|
-
* @signature
|
|
26
|
-
* P.ceil(precision)(value);
|
|
27
|
-
* @example
|
|
28
|
-
* P.ceil(3)(123.9876) // => 123.988
|
|
29
|
-
* P.ceil(1)(483.22243) // => 483.3
|
|
30
|
-
* P.ceil(-1)(8541) // => 8550
|
|
31
|
-
* P.ceil(-3)(456789) // => 457000
|
|
32
|
-
* @dataLast
|
|
33
|
-
* @category Number
|
|
34
|
-
*/
|
|
35
|
-
export declare function ceil(precision: number): (value: number) => number;
|
|
36
|
-
//# sourceMappingURL=ceil.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ceil.d.ts","sourceRoot":"","sources":["../../../src/number/ceil.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
interface Limits {
|
|
2
|
-
readonly max?: number;
|
|
3
|
-
readonly min?: number;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Clamp the given value within the inclusive min and max bounds.
|
|
7
|
-
* @param value the number
|
|
8
|
-
* @param limits the bounds limits
|
|
9
|
-
* @param limits.min the minimal bounds limits
|
|
10
|
-
* @param limits.max the maximal bounds limits
|
|
11
|
-
* @signature
|
|
12
|
-
* P.clamp(value, { min, max });
|
|
13
|
-
* @example
|
|
14
|
-
* P.clamp(10, { min: 20 }) // => 20
|
|
15
|
-
* P.clamp(10, { max: 5 }) // => 5
|
|
16
|
-
* P.clamp(10, { max: 20, min: 5 }) // => 10
|
|
17
|
-
* @dataFirst
|
|
18
|
-
* @category Number
|
|
19
|
-
*/
|
|
20
|
-
export declare function clamp(value: number, limits: Limits): number;
|
|
21
|
-
/**
|
|
22
|
-
* Clamp the given value within the inclusive min and max bounds.
|
|
23
|
-
* @param limits the bounds limits
|
|
24
|
-
* @param limits.min the minimal bounds limits
|
|
25
|
-
* @param limits.max the maximal bounds limits
|
|
26
|
-
* @signature
|
|
27
|
-
* P.clamp({ min, max })(value);
|
|
28
|
-
* @example
|
|
29
|
-
* P.clamp({ min: 20 })(10) // => 20
|
|
30
|
-
* P.clamp({ max: 5 })(10) // => 5
|
|
31
|
-
* P.clamp({ max: 20, min: 5 })(10) // => 10
|
|
32
|
-
* @dataLast
|
|
33
|
-
* @category Number
|
|
34
|
-
*/
|
|
35
|
-
export declare function clamp(limits: Limits): (value: number) => number;
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=clamp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clamp.d.ts","sourceRoot":"","sources":["../../../src/number/clamp.ts"],"names":[],"mappings":"AAEA,UAAU,MAAM;IACd,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;AAE7D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Divides two numbers.
|
|
3
|
-
* @param value The number.
|
|
4
|
-
* @param divisor The number to divide the value by.
|
|
5
|
-
* @signature
|
|
6
|
-
* P.divide(value, divisor);
|
|
7
|
-
* @example
|
|
8
|
-
* P.divide(12, 3) // => 4
|
|
9
|
-
* P.reduce([1, 2, 3, 4], P.divide, 24) // => 1
|
|
10
|
-
* @dataFirst
|
|
11
|
-
* @category Number
|
|
12
|
-
*/
|
|
13
|
-
export declare function divide(value: number, divisor: number): number;
|
|
14
|
-
/**
|
|
15
|
-
* Divides two numbers.
|
|
16
|
-
* @param divisor The number to divide the value by.
|
|
17
|
-
* @signature
|
|
18
|
-
* P.divide(divisor)(value);
|
|
19
|
-
* @example
|
|
20
|
-
* P.divide(3)(12) // => 4
|
|
21
|
-
* P.map([2, 4, 6, 8], P.divide(2)) // => [1, 2, 3, 4]
|
|
22
|
-
* @dataLast
|
|
23
|
-
* @category Number
|
|
24
|
-
*/
|
|
25
|
-
export declare function divide(divisor: number): (value: number) => number;
|
|
26
|
-
//# sourceMappingURL=divide.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divide.d.ts","sourceRoot":"","sources":["../../../src/number/divide.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rounds down a given number to a specific precision.
|
|
3
|
-
* If you'd like to round down to an integer (i.e. use this function with constant `precision === 0`),
|
|
4
|
-
* use `Math.floor` instead, as it won't incur the additional library overhead.
|
|
5
|
-
*
|
|
6
|
-
* @param value The number to round down.
|
|
7
|
-
* @param precision The precision to round down to. Must be an integer between -15 and 15.
|
|
8
|
-
* @signature
|
|
9
|
-
* P.floor(value, precision);
|
|
10
|
-
* @example
|
|
11
|
-
* P.floor(123.9876, 3) // => 123.987
|
|
12
|
-
* P.floor(483.22243, 1) // => 483.2
|
|
13
|
-
* P.floor(8541, -1) // => 8540
|
|
14
|
-
* P.floor(456789, -3) // => 456000
|
|
15
|
-
* @dataFirst
|
|
16
|
-
* @category Number
|
|
17
|
-
*/
|
|
18
|
-
export declare function floor(value: number, precision: number): number;
|
|
19
|
-
/**
|
|
20
|
-
* Rounds down a given number to a specific precision.
|
|
21
|
-
* If you'd like to round down to an integer (i.e. use this function with constant `precision === 0`),
|
|
22
|
-
* use `Math.floor` instead, as it won't incur the additional library overhead.
|
|
23
|
-
*
|
|
24
|
-
* @param precision The precision to round down to. Must be an integer between -15 and 15.
|
|
25
|
-
* @signature
|
|
26
|
-
* P.floor(precision)(value);
|
|
27
|
-
* @example
|
|
28
|
-
* P.floor(3)(123.9876) // => 123.987
|
|
29
|
-
* P.floor(1)(483.22243) // => 483.2
|
|
30
|
-
* P.floor(-1)(8541) // => 8540
|
|
31
|
-
* P.floor(-3)(456789) // => 456000
|
|
32
|
-
* @dataLast
|
|
33
|
-
* @category Number
|
|
34
|
-
*/
|
|
35
|
-
export declare function floor(precision: number): (value: number) => number;
|
|
36
|
-
//# sourceMappingURL=floor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"floor.d.ts","sourceRoot":"","sources":["../../../src/number/floor.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;AAEhE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/number/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Multiplies two numbers.
|
|
3
|
-
*
|
|
4
|
-
* @param value The number.
|
|
5
|
-
* @param multiplicand The number to multiply the value by.
|
|
6
|
-
* @signature
|
|
7
|
-
* P.multiply(value, multiplicand);
|
|
8
|
-
* @example
|
|
9
|
-
* P.multiply(3, 4) // => 12
|
|
10
|
-
* P.reduce([1, 2, 3, 4], P.multiply, 1) // => 24
|
|
11
|
-
* @dataFirst
|
|
12
|
-
* @category Number
|
|
13
|
-
*/
|
|
14
|
-
export declare function multiply(value: number, multiplicand: number): number;
|
|
15
|
-
/**
|
|
16
|
-
* Multiplies two numbers.
|
|
17
|
-
*
|
|
18
|
-
* @param multiplicand The number to multiply the value by.
|
|
19
|
-
* @signature
|
|
20
|
-
* P.multiply(multiplicand)(value);
|
|
21
|
-
* @example
|
|
22
|
-
* P.multiply(4)(3) // => 12
|
|
23
|
-
* P.map([1, 2, 3, 4], P.multiply(2)) // => [2, 4, 6, 8]
|
|
24
|
-
* @dataLast
|
|
25
|
-
* @category Number
|
|
26
|
-
*/
|
|
27
|
-
export declare function multiply(multiplicand: number): (value: number) => number;
|
|
28
|
-
//# sourceMappingURL=multiply.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multiply.d.ts","sourceRoot":"","sources":["../../../src/number/multiply.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rounds a given number to a specific precision.
|
|
3
|
-
* If you'd like to round to an integer (i.e. use this function with constant `precision === 0`),
|
|
4
|
-
* use `Math.round` instead, as it won't incur the additional library overhead.
|
|
5
|
-
*
|
|
6
|
-
* @param value The number to round.
|
|
7
|
-
* @param precision The precision to round to. Must be an integer between -15 and 15.
|
|
8
|
-
* @signature
|
|
9
|
-
* P.round(value, precision);
|
|
10
|
-
* @example
|
|
11
|
-
* P.round(123.9876, 3) // => 123.988
|
|
12
|
-
* P.round(483.22243, 1) // => 483.2
|
|
13
|
-
* P.round(8541, -1) // => 8540
|
|
14
|
-
* P.round(456789, -3) // => 457000
|
|
15
|
-
* @dataFirst
|
|
16
|
-
* @category Number
|
|
17
|
-
*/
|
|
18
|
-
export declare function round(value: number, precision: number): number;
|
|
19
|
-
/**
|
|
20
|
-
* Rounds a given number to a specific precision.
|
|
21
|
-
* If you'd like to round to an integer (i.e. use this function with constant `precision === 0`),
|
|
22
|
-
* use `Math.round` instead, as it won't incur the additional library overhead.
|
|
23
|
-
*
|
|
24
|
-
* @param precision The precision to round to. Must be an integer between -15 and 15.
|
|
25
|
-
* @signature
|
|
26
|
-
* P.round(precision)(value);
|
|
27
|
-
* @example
|
|
28
|
-
* P.round(3)(123.9876) // => 123.988
|
|
29
|
-
* P.round(1)(483.22243) // => 483.2
|
|
30
|
-
* P.round(-1)(8541) // => 8540
|
|
31
|
-
* P.round(-3)(456789) // => 457000
|
|
32
|
-
* @dataLast
|
|
33
|
-
* @category Number
|
|
34
|
-
*/
|
|
35
|
-
export declare function round(precision: number): (value: number) => number;
|
|
36
|
-
//# sourceMappingURL=round.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"round.d.ts","sourceRoot":"","sources":["../../../src/number/round.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;AAEhE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Subtracts two numbers.
|
|
3
|
-
*
|
|
4
|
-
* @param value The number.
|
|
5
|
-
* @param subtrahend The number to subtract from the value.
|
|
6
|
-
* @signature
|
|
7
|
-
* P.subtract(value, subtrahend);
|
|
8
|
-
* @example
|
|
9
|
-
* P.subtract(10, 5) // => 5
|
|
10
|
-
* P.subtract(10, -5) // => 15
|
|
11
|
-
* R.reduce([1, 2, 3, 4], P.subtract, 20) // => 10
|
|
12
|
-
* @dataFirst
|
|
13
|
-
* @category Number
|
|
14
|
-
*/
|
|
15
|
-
export declare function subtract(value: number, subtrahend: number): number;
|
|
16
|
-
/**
|
|
17
|
-
* Subtracts two numbers.
|
|
18
|
-
*
|
|
19
|
-
* @param subtrahend The number to subtract from the value.
|
|
20
|
-
* @signature
|
|
21
|
-
* P.subtract(subtrahend)(value);
|
|
22
|
-
* @example
|
|
23
|
-
* P.subtract(5)(10) // => 5
|
|
24
|
-
* P.subtract(-5)(10) // => 15
|
|
25
|
-
* P.map([1, 2, 3, 4], P.subtract(1)) // => [0, 1, 2, 3]
|
|
26
|
-
* @dataLast
|
|
27
|
-
* @category Number
|
|
28
|
-
*/
|
|
29
|
-
export declare function subtract(subtrahend: number): (value: number) => number;
|
|
30
|
-
//# sourceMappingURL=subtract.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subtract.d.ts","sourceRoot":"","sources":["../../../src/number/subtract.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;AAEpE;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Add a new property to an object.
|
|
3
|
-
* @param obj the target object
|
|
4
|
-
* @param prop the property name
|
|
5
|
-
* @param value the property value
|
|
6
|
-
* @signature
|
|
7
|
-
* P.addProp(obj, prop, value)
|
|
8
|
-
* @example
|
|
9
|
-
* P.addProp({firstName: 'john'}, 'lastName', 'doe') // => {firstName: 'john', lastName: 'doe'}
|
|
10
|
-
* @dataFirst
|
|
11
|
-
* @category Object
|
|
12
|
-
*/
|
|
13
|
-
export declare function addProp<T extends Record<PropertyKey, unknown>, K extends string, V>(obj: T, prop: K, value: V): T & {
|
|
14
|
-
[x in K]: V;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Add a new property to an object.
|
|
18
|
-
* @param prop the property name
|
|
19
|
-
* @param value the property value
|
|
20
|
-
* @signature
|
|
21
|
-
* P.addProp(prop, value)(obj)
|
|
22
|
-
* @example
|
|
23
|
-
* P.addProp('lastName', 'doe')({firstName: 'john'}) // => {firstName: 'john', lastName: 'doe'}
|
|
24
|
-
* @dataLast
|
|
25
|
-
* @category Object
|
|
26
|
-
*/
|
|
27
|
-
export declare function addProp<T extends Record<PropertyKey, unknown>, K extends string, V>(prop: K, value: V): (obj: T) => T & {
|
|
28
|
-
[x in K]: V;
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=add-prop.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-prop.d.ts","sourceRoot":"","sources":["../../../src/object/add-prop.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CACrB,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,CAAC,SAAS,MAAM,EAChB,CAAC,EACD,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG;KAAG,CAAC,IAAI,CAAC,GAAG,CAAC;CAAE,CAAC;AAElD;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CACrB,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,CAAC,SAAS,MAAM,EAChB,CAAC,EACD,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG;KAAG,CAAC,IAAI,CAAC,GAAG,CAAC;CAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a deep copy of the value. Supported types: `Array`, `Object`, `Number`, `String`, `Boolean`, `Date`, `RegExp`. Functions are assigned by reference rather than copied.
|
|
3
|
-
* @param value the object to clone
|
|
4
|
-
* @category Object
|
|
5
|
-
* @signature P.clone(value)
|
|
6
|
-
* @example
|
|
7
|
-
* P.clone({foo: 'bar'}) // {foo: 'bar'}
|
|
8
|
-
*/
|
|
9
|
-
export declare function clone<T>(value: T): T;
|
|
10
|
-
//# sourceMappingURL=clone.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../../src/object/clone.ts"],"names":[],"mappings":"AAsDA;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAIpC"}
|