@vielzeug/toolkit 1.1.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +325 -452
- package/dist/array/chunk.cjs +2 -2
- package/dist/array/chunk.cjs.map +1 -1
- package/dist/array/chunk.d.ts +29 -0
- package/dist/array/chunk.d.ts.map +1 -0
- package/dist/array/chunk.js +22 -24
- package/dist/array/chunk.js.map +1 -1
- package/dist/array/contains.cjs +2 -2
- package/dist/array/contains.cjs.map +1 -1
- package/dist/array/contains.d.ts +19 -0
- package/dist/array/contains.d.ts.map +1 -0
- package/dist/array/contains.js +12 -9
- package/dist/array/contains.js.map +1 -1
- package/dist/array/fold.cjs +2 -0
- package/dist/array/fold.cjs.map +1 -0
- package/dist/array/fold.d.ts +21 -0
- package/dist/array/fold.d.ts.map +1 -0
- package/dist/array/fold.js +19 -0
- package/dist/array/fold.js.map +1 -0
- package/dist/array/group.cjs +2 -2
- package/dist/array/group.cjs.map +1 -1
- package/dist/array/group.d.ts +19 -0
- package/dist/array/group.d.ts.map +1 -0
- package/dist/array/group.js +18 -15
- package/dist/array/group.js.map +1 -1
- package/dist/array/index.d.ts +16 -0
- package/dist/array/index.d.ts.map +1 -0
- package/dist/array/keyBy.cjs +2 -0
- package/dist/array/keyBy.cjs.map +1 -0
- package/dist/array/keyBy.d.ts +20 -0
- package/dist/array/keyBy.d.ts.map +1 -0
- package/dist/array/keyBy.js +19 -0
- package/dist/array/keyBy.js.map +1 -0
- package/dist/array/list.cjs +2 -2
- package/dist/array/list.cjs.map +1 -1
- package/dist/array/list.d.ts +58 -0
- package/dist/array/list.d.ts.map +1 -0
- package/dist/array/list.js +103 -106
- package/dist/array/list.js.map +1 -1
- package/dist/array/pick.cjs +2 -2
- package/dist/array/pick.cjs.map +1 -1
- package/dist/array/pick.d.ts +19 -0
- package/dist/array/pick.d.ts.map +1 -0
- package/dist/array/pick.js +15 -14
- package/dist/array/pick.js.map +1 -1
- package/dist/array/remoteList.cjs +2 -2
- package/dist/array/remoteList.cjs.map +1 -1
- package/dist/array/remoteList.d.ts +64 -0
- package/dist/array/remoteList.d.ts.map +1 -0
- package/dist/array/remoteList.js +121 -122
- package/dist/array/remoteList.js.map +1 -1
- package/dist/array/replace.cjs +2 -0
- package/dist/array/replace.cjs.map +1 -0
- package/dist/array/replace.d.ts +20 -0
- package/dist/array/replace.d.ts.map +1 -0
- package/dist/array/replace.js +19 -0
- package/dist/array/replace.js.map +1 -0
- package/dist/array/rotate.cjs +2 -0
- package/dist/array/rotate.cjs.map +1 -0
- package/dist/array/rotate.d.ts +22 -0
- package/dist/array/rotate.d.ts.map +1 -0
- package/dist/array/rotate.js +19 -0
- package/dist/array/rotate.js.map +1 -0
- package/dist/array/search.cjs +2 -2
- package/dist/array/search.cjs.map +1 -1
- package/dist/array/search.d.ts +19 -0
- package/dist/array/search.d.ts.map +1 -0
- package/dist/array/search.js +23 -13
- package/dist/array/search.js.map +1 -1
- package/dist/array/select.cjs +2 -2
- package/dist/array/select.cjs.map +1 -1
- package/dist/array/select.d.ts +21 -0
- package/dist/array/select.d.ts.map +1 -0
- package/dist/array/select.js +16 -15
- package/dist/array/select.js.map +1 -1
- package/dist/array/sort.cjs +2 -2
- package/dist/array/sort.cjs.map +1 -1
- package/dist/array/sort.d.ts +26 -0
- package/dist/array/sort.d.ts.map +1 -0
- package/dist/array/sort.js +18 -12
- package/dist/array/sort.js.map +1 -1
- package/dist/array/toggle.cjs +2 -0
- package/dist/array/toggle.cjs.map +1 -0
- package/dist/array/toggle.d.ts +29 -0
- package/dist/array/toggle.d.ts.map +1 -0
- package/dist/array/toggle.js +9 -0
- package/dist/array/toggle.js.map +1 -0
- package/dist/array/uniq.cjs +2 -2
- package/dist/array/uniq.cjs.map +1 -1
- package/dist/array/uniq.d.ts +21 -0
- package/dist/array/uniq.d.ts.map +1 -0
- package/dist/array/uniq.js +15 -17
- package/dist/array/uniq.js.map +1 -1
- package/dist/async/attempt.cjs +2 -2
- package/dist/async/attempt.cjs.map +1 -1
- package/dist/async/attempt.d.ts +40 -0
- package/dist/async/attempt.d.ts.map +1 -0
- package/dist/async/attempt.js +19 -14
- package/dist/async/attempt.js.map +1 -1
- package/dist/async/defer.cjs +2 -2
- package/dist/async/defer.cjs.map +1 -1
- package/dist/async/defer.d.ts +23 -0
- package/dist/async/defer.d.ts.map +1 -0
- package/dist/async/defer.js +12 -9
- package/dist/async/defer.js.map +1 -1
- package/dist/async/index.d.ts +12 -0
- package/dist/async/index.d.ts.map +1 -0
- package/dist/async/parallel.cjs +2 -2
- package/dist/async/parallel.cjs.map +1 -1
- package/dist/async/parallel.d.ts +31 -0
- package/dist/async/parallel.d.ts.map +1 -0
- package/dist/async/parallel.js +26 -27
- package/dist/async/parallel.js.map +1 -1
- package/dist/async/pool.cjs +2 -2
- package/dist/async/pool.cjs.map +1 -1
- package/dist/async/pool.d.ts +21 -0
- package/dist/async/pool.d.ts.map +1 -0
- package/dist/async/pool.js +23 -21
- package/dist/async/pool.js.map +1 -1
- package/dist/async/predict.cjs +2 -2
- package/dist/async/predict.cjs.map +1 -1
- package/dist/async/predict.d.ts +24 -0
- package/dist/async/predict.d.ts.map +1 -0
- package/dist/async/predict.js +10 -12
- package/dist/async/predict.js.map +1 -1
- package/dist/async/queue.cjs +2 -2
- package/dist/async/queue.cjs.map +1 -1
- package/dist/async/queue.d.ts +43 -0
- package/dist/async/queue.d.ts.map +1 -0
- package/dist/async/queue.js +52 -56
- package/dist/async/queue.js.map +1 -1
- package/dist/async/race.cjs +2 -2
- package/dist/async/race.cjs.map +1 -1
- package/dist/async/race.d.ts +16 -0
- package/dist/async/race.d.ts.map +1 -0
- package/dist/async/race.js +8 -7
- package/dist/async/race.js.map +1 -1
- package/dist/async/retry.cjs +2 -2
- package/dist/async/retry.cjs.map +1 -1
- package/dist/async/retry.d.ts +32 -0
- package/dist/async/retry.d.ts.map +1 -0
- package/dist/async/retry.js +19 -24
- package/dist/async/retry.js.map +1 -1
- package/dist/async/scheduler.cjs +2 -0
- package/dist/async/scheduler.cjs.map +1 -0
- package/dist/async/scheduler.d.ts +51 -0
- package/dist/async/scheduler.d.ts.map +1 -0
- package/dist/async/scheduler.js +43 -0
- package/dist/async/scheduler.js.map +1 -0
- package/dist/async/sleep.cjs +2 -2
- package/dist/async/sleep.cjs.map +1 -1
- package/dist/async/sleep.d.ts +16 -0
- package/dist/async/sleep.d.ts.map +1 -0
- package/dist/async/sleep.js +11 -11
- package/dist/async/sleep.js.map +1 -1
- package/dist/async/waitFor.cjs +2 -2
- package/dist/async/waitFor.cjs.map +1 -1
- package/dist/async/waitFor.d.ts +33 -0
- package/dist/async/waitFor.d.ts.map +1 -0
- package/dist/async/waitFor.js +29 -36
- package/dist/async/waitFor.js.map +1 -1
- package/dist/date/expires.cjs +2 -2
- package/dist/date/expires.cjs.map +1 -1
- package/dist/date/expires.d.ts +15 -0
- package/dist/date/expires.d.ts.map +1 -0
- package/dist/date/expires.js +11 -10
- package/dist/date/expires.js.map +1 -1
- package/dist/date/index.d.ts +4 -0
- package/dist/date/index.d.ts.map +1 -0
- package/dist/date/interval.cjs +2 -2
- package/dist/date/interval.cjs.map +1 -1
- package/dist/date/interval.d.ts +25 -0
- package/dist/date/interval.d.ts.map +1 -0
- package/dist/date/interval.js +31 -37
- package/dist/date/interval.js.map +1 -1
- package/dist/date/timeDiff.cjs +2 -2
- package/dist/date/timeDiff.cjs.map +1 -1
- package/dist/date/timeDiff.d.ts +24 -0
- package/dist/date/timeDiff.d.ts.map +1 -0
- package/dist/date/timeDiff.js +58 -25
- package/dist/date/timeDiff.js.map +1 -1
- package/dist/function/assert.cjs +2 -3
- package/dist/function/assert.cjs.map +1 -1
- package/dist/function/assert.d.ts +38 -0
- package/dist/function/assert.d.ts.map +1 -0
- package/dist/function/assert.js +13 -11
- package/dist/function/assert.js.map +1 -1
- package/dist/function/assertParams.cjs +2 -2
- package/dist/function/assertParams.cjs.map +1 -1
- package/dist/function/assertParams.d.ts +24 -0
- package/dist/function/assertParams.d.ts.map +1 -0
- package/dist/function/assertParams.js +13 -12
- package/dist/function/assertParams.js.map +1 -1
- package/dist/function/compare.cjs +2 -2
- package/dist/function/compare.cjs.map +1 -1
- package/dist/function/compare.d.ts +23 -0
- package/dist/function/compare.d.ts.map +1 -0
- package/dist/function/compare.js +22 -21
- package/dist/function/compare.js.map +1 -1
- package/dist/function/compareBy.cjs +2 -2
- package/dist/function/compareBy.cjs.map +1 -1
- package/dist/function/compareBy.d.ts +24 -0
- package/dist/function/compareBy.d.ts.map +1 -0
- package/dist/function/compareBy.js +15 -14
- package/dist/function/compareBy.js.map +1 -1
- package/dist/function/compose.cjs +2 -2
- package/dist/function/compose.cjs.map +1 -1
- package/dist/function/compose.d.ts +22 -0
- package/dist/function/compose.d.ts.map +1 -0
- package/dist/function/compose.js +10 -13
- package/dist/function/compose.js.map +1 -1
- package/dist/function/curry.cjs +2 -2
- package/dist/function/curry.cjs.map +1 -1
- package/dist/function/curry.d.ts +21 -0
- package/dist/function/curry.d.ts.map +1 -0
- package/dist/function/curry.js +8 -7
- package/dist/function/curry.js.map +1 -1
- package/dist/function/debounce.cjs +2 -2
- package/dist/function/debounce.cjs.map +1 -1
- package/dist/function/debounce.d.ts +12 -0
- package/dist/function/debounce.d.ts.map +1 -0
- package/dist/function/debounce.js +34 -26
- package/dist/function/debounce.js.map +1 -1
- package/dist/function/fp.cjs +2 -2
- package/dist/function/fp.cjs.map +1 -1
- package/dist/function/fp.d.ts +24 -0
- package/dist/function/fp.d.ts.map +1 -0
- package/dist/function/fp.js +6 -10
- package/dist/function/fp.js.map +1 -1
- package/dist/function/index.d.ts +13 -0
- package/dist/function/index.d.ts.map +1 -0
- package/dist/function/memo.cjs +2 -2
- package/dist/function/memo.cjs.map +1 -1
- package/dist/function/memo.d.ts +30 -0
- package/dist/function/memo.d.ts.map +1 -0
- package/dist/function/memo.js +16 -24
- package/dist/function/memo.js.map +1 -1
- package/dist/function/once.cjs +2 -2
- package/dist/function/once.cjs.map +1 -1
- package/dist/function/once.d.ts +24 -0
- package/dist/function/once.d.ts.map +1 -0
- package/dist/function/once.js +10 -10
- package/dist/function/once.js.map +1 -1
- package/dist/function/pipe.cjs +2 -2
- package/dist/function/pipe.cjs.map +1 -1
- package/dist/function/pipe.d.ts +23 -0
- package/dist/function/pipe.d.ts.map +1 -0
- package/dist/function/pipe.js +10 -10
- package/dist/function/pipe.js.map +1 -1
- package/dist/function/throttle.cjs +2 -2
- package/dist/function/throttle.cjs.map +1 -1
- package/dist/function/throttle.d.ts +21 -0
- package/dist/function/throttle.d.ts.map +1 -0
- package/dist/function/throttle.js +45 -37
- package/dist/function/throttle.js.map +1 -1
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +77 -2813
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +75 -253
- package/dist/math/abs.cjs +2 -2
- package/dist/math/abs.cjs.map +1 -1
- package/dist/math/abs.d.ts +17 -0
- package/dist/math/abs.d.ts.map +1 -0
- package/dist/math/abs.js +7 -6
- package/dist/math/abs.js.map +1 -1
- package/dist/math/allocate.cjs +2 -2
- package/dist/math/allocate.cjs.map +1 -1
- package/dist/math/allocate.d.ts +24 -0
- package/dist/math/allocate.d.ts.map +1 -0
- package/dist/math/allocate.js +20 -28
- package/dist/math/allocate.js.map +1 -1
- package/dist/math/average.cjs +2 -2
- package/dist/math/average.cjs.map +1 -1
- package/dist/math/average.d.ts +16 -0
- package/dist/math/average.d.ts.map +1 -0
- package/dist/math/average.js +13 -24
- package/dist/math/average.js.map +1 -1
- package/dist/math/clamp.cjs +2 -2
- package/dist/math/clamp.cjs.map +1 -1
- package/dist/math/clamp.d.ts +18 -0
- package/dist/math/clamp.d.ts.map +1 -0
- package/dist/math/clamp.js +7 -6
- package/dist/math/clamp.js.map +1 -1
- package/dist/math/distribute.cjs +2 -2
- package/dist/math/distribute.cjs.map +1 -1
- package/dist/math/distribute.d.ts +24 -0
- package/dist/math/distribute.d.ts.map +1 -0
- package/dist/math/distribute.js +14 -17
- package/dist/math/distribute.js.map +1 -1
- package/dist/math/index.d.ts +14 -0
- package/dist/math/index.d.ts.map +1 -0
- package/dist/math/linspace.cjs +2 -0
- package/dist/math/linspace.cjs.map +1 -0
- package/dist/math/linspace.d.ts +19 -0
- package/dist/math/linspace.d.ts.map +1 -0
- package/dist/math/linspace.js +11 -0
- package/dist/math/linspace.js.map +1 -0
- package/dist/math/max.cjs +2 -2
- package/dist/math/max.cjs.map +1 -1
- package/dist/math/max.d.ts +23 -0
- package/dist/math/max.d.ts.map +1 -0
- package/dist/math/max.js +10 -11
- package/dist/math/max.js.map +1 -1
- package/dist/math/median.cjs +2 -2
- package/dist/math/median.cjs.map +1 -1
- package/dist/math/median.d.ts +17 -0
- package/dist/math/median.d.ts.map +1 -0
- package/dist/math/median.js +11 -10
- package/dist/math/median.js.map +1 -1
- package/dist/math/min.cjs +2 -2
- package/dist/math/min.cjs.map +1 -1
- package/dist/math/min.d.ts +23 -0
- package/dist/math/min.d.ts.map +1 -0
- package/dist/math/min.js +10 -11
- package/dist/math/min.js.map +1 -1
- package/dist/math/percent.cjs +2 -0
- package/dist/math/percent.cjs.map +1 -0
- package/dist/math/percent.d.ts +19 -0
- package/dist/math/percent.d.ts.map +1 -0
- package/dist/math/percent.js +8 -0
- package/dist/math/percent.js.map +1 -0
- package/dist/math/range.cjs +2 -2
- package/dist/math/range.cjs.map +1 -1
- package/dist/math/range.d.ts +23 -0
- package/dist/math/range.d.ts.map +1 -0
- package/dist/math/range.js +28 -17
- package/dist/math/range.js.map +1 -1
- package/dist/math/round.cjs +2 -2
- package/dist/math/round.cjs.map +1 -1
- package/dist/math/round.d.ts +21 -0
- package/dist/math/round.d.ts.map +1 -0
- package/dist/math/round.js +9 -8
- package/dist/math/round.js.map +1 -1
- package/dist/math/sum.cjs +2 -2
- package/dist/math/sum.cjs.map +1 -1
- package/dist/math/sum.d.ts +17 -0
- package/dist/math/sum.d.ts.map +1 -0
- package/dist/math/sum.js +11 -14
- package/dist/math/sum.js.map +1 -1
- package/dist/money/currency.cjs +2 -2
- package/dist/money/currency.cjs.map +1 -1
- package/dist/money/currency.d.ts +30 -0
- package/dist/money/currency.d.ts.map +1 -0
- package/dist/money/currency.js +19 -47
- package/dist/money/currency.js.map +1 -1
- package/dist/money/exchange.cjs +2 -2
- package/dist/money/exchange.cjs.map +1 -1
- package/dist/money/exchange.d.ts +29 -0
- package/dist/money/exchange.d.ts.map +1 -0
- package/dist/money/exchange.js +12 -12
- package/dist/money/exchange.js.map +1 -1
- package/dist/money/index.d.ts +4 -0
- package/dist/money/index.d.ts.map +1 -0
- package/dist/money/types.d.ts +9 -0
- package/dist/money/types.d.ts.map +1 -0
- package/dist/object/diff.cjs +2 -2
- package/dist/object/diff.cjs.map +1 -1
- package/dist/object/diff.d.ts +26 -0
- package/dist/object/diff.d.ts.map +1 -0
- package/dist/object/diff.js +19 -17
- package/dist/object/diff.js.map +1 -1
- package/dist/object/index.d.ts +9 -0
- package/dist/object/index.d.ts.map +1 -0
- package/dist/object/merge.cjs +2 -2
- package/dist/object/merge.cjs.map +1 -1
- package/dist/object/merge.d.ts +44 -0
- package/dist/object/merge.d.ts.map +1 -0
- package/dist/object/merge.js +27 -21
- package/dist/object/merge.js.map +1 -1
- package/dist/object/parseJSON.cjs +2 -2
- package/dist/object/parseJSON.cjs.map +1 -1
- package/dist/object/parseJSON.d.ts +32 -0
- package/dist/object/parseJSON.d.ts.map +1 -0
- package/dist/object/parseJSON.js +17 -18
- package/dist/object/parseJSON.js.map +1 -1
- package/dist/object/path.cjs +2 -2
- package/dist/object/path.cjs.map +1 -1
- package/dist/object/path.d.ts +32 -0
- package/dist/object/path.d.ts.map +1 -0
- package/dist/object/path.js +25 -23
- package/dist/object/path.js.map +1 -1
- package/dist/object/proxy.cjs +2 -0
- package/dist/object/proxy.cjs.map +1 -0
- package/dist/object/proxy.d.ts +30 -0
- package/dist/object/proxy.d.ts.map +1 -0
- package/dist/object/proxy.js +21 -0
- package/dist/object/proxy.js.map +1 -0
- package/dist/object/prune.cjs +2 -0
- package/dist/object/prune.cjs.map +1 -0
- package/dist/object/prune.d.ts +21 -0
- package/dist/object/prune.d.ts.map +1 -0
- package/dist/object/prune.js +31 -0
- package/dist/object/prune.js.map +1 -0
- package/dist/object/seek.cjs +2 -2
- package/dist/object/seek.cjs.map +1 -1
- package/dist/object/seek.d.ts +2 -0
- package/dist/object/seek.d.ts.map +1 -0
- package/dist/object/seek.js +25 -12
- package/dist/object/seek.js.map +1 -1
- package/dist/object/stash.cjs +2 -0
- package/dist/object/stash.cjs.map +1 -0
- package/dist/object/stash.d.ts +45 -0
- package/dist/object/stash.d.ts.map +1 -0
- package/dist/object/stash.js +99 -0
- package/dist/object/stash.js.map +1 -0
- package/dist/random/draw.cjs +2 -2
- package/dist/random/draw.cjs.map +1 -1
- package/dist/random/draw.d.ts +16 -0
- package/dist/random/draw.d.ts.map +1 -0
- package/dist/random/draw.js +13 -10
- package/dist/random/draw.js.map +1 -1
- package/dist/random/index.d.ts +5 -0
- package/dist/random/index.d.ts.map +1 -0
- package/dist/random/random.cjs +2 -2
- package/dist/random/random.cjs.map +1 -1
- package/dist/random/random.d.ts +14 -0
- package/dist/random/random.d.ts.map +1 -0
- package/dist/random/random.js +16 -9
- package/dist/random/random.js.map +1 -1
- package/dist/random/shuffle.cjs +2 -2
- package/dist/random/shuffle.cjs.map +1 -1
- package/dist/random/shuffle.d.ts +17 -0
- package/dist/random/shuffle.d.ts.map +1 -0
- package/dist/random/shuffle.js +18 -14
- package/dist/random/shuffle.js.map +1 -1
- package/dist/random/uuid.cjs +2 -2
- package/dist/random/uuid.cjs.map +1 -1
- package/dist/random/uuid.d.ts +12 -0
- package/dist/random/uuid.d.ts.map +1 -0
- package/dist/random/uuid.js +7 -9
- package/dist/random/uuid.js.map +1 -1
- package/dist/string/_caseUtils.cjs +2 -2
- package/dist/string/_caseUtils.cjs.map +1 -1
- package/dist/string/_caseUtils.d.ts +13 -0
- package/dist/string/_caseUtils.d.ts.map +1 -0
- package/dist/string/_caseUtils.js +8 -8
- package/dist/string/_caseUtils.js.map +1 -1
- package/dist/string/camelCase.cjs +2 -2
- package/dist/string/camelCase.cjs.map +1 -1
- package/dist/string/camelCase.d.ts +14 -0
- package/dist/string/camelCase.d.ts.map +1 -0
- package/dist/string/camelCase.js +8 -7
- package/dist/string/camelCase.js.map +1 -1
- package/dist/string/index.d.ts +7 -0
- package/dist/string/index.d.ts.map +1 -0
- package/dist/string/kebabCase.cjs +2 -2
- package/dist/string/kebabCase.cjs.map +1 -1
- package/dist/string/kebabCase.d.ts +15 -0
- package/dist/string/kebabCase.d.ts.map +1 -0
- package/dist/string/kebabCase.js +8 -7
- package/dist/string/kebabCase.js.map +1 -1
- package/dist/string/pascalCase.cjs +2 -2
- package/dist/string/pascalCase.cjs.map +1 -1
- package/dist/string/pascalCase.d.ts +15 -0
- package/dist/string/pascalCase.d.ts.map +1 -0
- package/dist/string/pascalCase.js +8 -7
- package/dist/string/pascalCase.js.map +1 -1
- package/dist/string/similarity.cjs +2 -2
- package/dist/string/similarity.cjs.map +1 -1
- package/dist/string/similarity.d.ts +20 -0
- package/dist/string/similarity.d.ts.map +1 -0
- package/dist/string/similarity.js +20 -36
- package/dist/string/similarity.js.map +1 -1
- package/dist/string/snakeCase.cjs +2 -2
- package/dist/string/snakeCase.cjs.map +1 -1
- package/dist/string/snakeCase.d.ts +15 -0
- package/dist/string/snakeCase.d.ts.map +1 -0
- package/dist/string/snakeCase.js +8 -7
- package/dist/string/snakeCase.js.map +1 -1
- package/dist/string/truncate.cjs +2 -2
- package/dist/string/truncate.cjs.map +1 -1
- package/dist/string/truncate.d.ts +28 -0
- package/dist/string/truncate.d.ts.map +1 -0
- package/dist/string/truncate.js +20 -17
- package/dist/string/truncate.js.map +1 -1
- package/dist/toolkit.cjs +2 -0
- package/dist/toolkit.cjs.map +1 -0
- package/dist/toolkit.js +1523 -0
- package/dist/toolkit.js.map +1 -0
- package/dist/typed/index.d.ts +24 -0
- package/dist/typed/index.d.ts.map +1 -0
- package/dist/typed/is.cjs +2 -2
- package/dist/typed/is.cjs.map +1 -1
- package/dist/typed/is.d.ts +95 -0
- package/dist/typed/is.d.ts.map +1 -0
- package/dist/typed/is.js +54 -42
- package/dist/typed/is.js.map +1 -1
- package/dist/typed/isArray.cjs +2 -2
- package/dist/typed/isArray.cjs.map +1 -1
- package/dist/typed/isArray.d.ts +16 -0
- package/dist/typed/isArray.d.ts.map +1 -0
- package/dist/typed/isArray.js +8 -8
- package/dist/typed/isArray.js.map +1 -1
- package/dist/typed/isBoolean.cjs +2 -2
- package/dist/typed/isBoolean.cjs.map +1 -1
- package/dist/typed/isBoolean.d.ts +23 -0
- package/dist/typed/isBoolean.d.ts.map +1 -0
- package/dist/typed/isBoolean.js +7 -6
- package/dist/typed/isBoolean.js.map +1 -1
- package/dist/typed/isDate.cjs +2 -2
- package/dist/typed/isDate.cjs.map +1 -1
- package/dist/typed/isDate.d.ts +16 -0
- package/dist/typed/isDate.d.ts.map +1 -0
- package/dist/typed/isDate.js +7 -8
- package/dist/typed/isDate.js.map +1 -1
- package/dist/typed/isDefined.cjs +2 -2
- package/dist/typed/isDefined.cjs.map +1 -1
- package/dist/typed/isDefined.d.ts +19 -0
- package/dist/typed/isDefined.d.ts.map +1 -0
- package/dist/typed/isDefined.js +7 -6
- package/dist/typed/isDefined.js.map +1 -1
- package/dist/typed/isEmpty.cjs +2 -2
- package/dist/typed/isEmpty.cjs.map +1 -1
- package/dist/typed/isEmpty.d.ts +24 -0
- package/dist/typed/isEmpty.d.ts.map +1 -0
- package/dist/typed/isEmpty.js +8 -9
- package/dist/typed/isEmpty.js.map +1 -1
- package/dist/typed/isEqual.cjs +2 -2
- package/dist/typed/isEqual.cjs.map +1 -1
- package/dist/typed/isEqual.d.ts +24 -0
- package/dist/typed/isEqual.d.ts.map +1 -0
- package/dist/typed/isEqual.js +27 -28
- package/dist/typed/isEqual.js.map +1 -1
- package/dist/typed/isEven.cjs +2 -2
- package/dist/typed/isEven.cjs.map +1 -1
- package/dist/typed/isEven.d.ts +9 -0
- package/dist/typed/isEven.d.ts.map +1 -0
- package/dist/typed/isEven.js +7 -6
- package/dist/typed/isEven.js.map +1 -1
- package/dist/typed/isFunction.cjs +2 -2
- package/dist/typed/isFunction.cjs.map +1 -1
- package/dist/typed/isFunction.d.ts +16 -0
- package/dist/typed/isFunction.d.ts.map +1 -0
- package/dist/typed/isFunction.js +7 -8
- package/dist/typed/isFunction.js.map +1 -1
- package/dist/typed/isMatch.cjs +2 -2
- package/dist/typed/isMatch.cjs.map +1 -1
- package/dist/typed/isMatch.d.ts +23 -0
- package/dist/typed/isMatch.d.ts.map +1 -0
- package/dist/typed/isMatch.js +16 -18
- package/dist/typed/isMatch.js.map +1 -1
- package/dist/typed/isNegative.cjs +2 -2
- package/dist/typed/isNegative.cjs.map +1 -1
- package/dist/typed/isNegative.d.ts +26 -0
- package/dist/typed/isNegative.d.ts.map +1 -0
- package/dist/typed/isNegative.js +7 -6
- package/dist/typed/isNegative.js.map +1 -1
- package/dist/typed/isNil.cjs +2 -2
- package/dist/typed/isNil.cjs.map +1 -1
- package/dist/typed/isNil.d.ts +17 -0
- package/dist/typed/isNil.d.ts.map +1 -0
- package/dist/typed/isNil.js +7 -8
- package/dist/typed/isNil.js.map +1 -1
- package/dist/typed/isNumber.cjs +2 -2
- package/dist/typed/isNumber.cjs.map +1 -1
- package/dist/typed/isNumber.d.ts +16 -0
- package/dist/typed/isNumber.d.ts.map +1 -0
- package/dist/typed/isNumber.js +8 -8
- package/dist/typed/isNumber.js.map +1 -1
- package/dist/typed/isObject.cjs +2 -2
- package/dist/typed/isObject.cjs.map +1 -1
- package/dist/typed/isObject.d.ts +19 -0
- package/dist/typed/isObject.d.ts.map +1 -0
- package/dist/typed/isObject.js +8 -8
- package/dist/typed/isObject.js.map +1 -1
- package/dist/typed/isOdd.cjs +2 -2
- package/dist/typed/isOdd.cjs.map +1 -1
- package/dist/typed/isOdd.d.ts +9 -0
- package/dist/typed/isOdd.d.ts.map +1 -0
- package/dist/typed/isOdd.js +7 -6
- package/dist/typed/isOdd.js.map +1 -1
- package/dist/typed/isPositive.cjs +2 -2
- package/dist/typed/isPositive.cjs.map +1 -1
- package/dist/typed/isPositive.d.ts +26 -0
- package/dist/typed/isPositive.d.ts.map +1 -0
- package/dist/typed/isPositive.js +7 -6
- package/dist/typed/isPositive.js.map +1 -1
- package/dist/typed/isPrimitive.cjs +2 -2
- package/dist/typed/isPrimitive.cjs.map +1 -1
- package/dist/typed/isPrimitive.d.ts +18 -0
- package/dist/typed/isPrimitive.d.ts.map +1 -0
- package/dist/typed/isPrimitive.js +8 -9
- package/dist/typed/isPrimitive.js.map +1 -1
- package/dist/typed/isPromise.cjs +2 -2
- package/dist/typed/isPromise.cjs.map +1 -1
- package/dist/typed/isPromise.d.ts +17 -0
- package/dist/typed/isPromise.d.ts.map +1 -0
- package/dist/typed/isPromise.js +7 -9
- package/dist/typed/isPromise.js.map +1 -1
- package/dist/typed/isRegex.cjs +2 -2
- package/dist/typed/isRegex.cjs.map +1 -1
- package/dist/typed/isRegex.d.ts +21 -0
- package/dist/typed/isRegex.d.ts.map +1 -0
- package/dist/typed/isRegex.js +7 -6
- package/dist/typed/isRegex.js.map +1 -1
- package/dist/typed/isString.cjs +2 -2
- package/dist/typed/isString.cjs.map +1 -1
- package/dist/typed/isString.d.ts +16 -0
- package/dist/typed/isString.d.ts.map +1 -0
- package/dist/typed/isString.js +8 -8
- package/dist/typed/isString.js.map +1 -1
- package/dist/typed/isWithin.cjs +2 -2
- package/dist/typed/isWithin.cjs.map +1 -1
- package/dist/typed/isWithin.d.ts +20 -0
- package/dist/typed/isWithin.d.ts.map +1 -0
- package/dist/typed/isWithin.js +9 -9
- package/dist/typed/isWithin.js.map +1 -1
- package/dist/typed/isZero.cjs +2 -2
- package/dist/typed/isZero.cjs.map +1 -1
- package/dist/typed/isZero.d.ts +25 -0
- package/dist/typed/isZero.d.ts.map +1 -0
- package/dist/typed/isZero.js +7 -6
- package/dist/typed/isZero.js.map +1 -1
- package/dist/typed/typeOf.cjs +2 -2
- package/dist/typed/typeOf.cjs.map +1 -1
- package/dist/typed/typeOf.d.ts +30 -0
- package/dist/typed/typeOf.d.ts.map +1 -0
- package/dist/typed/typeOf.js +11 -13
- package/dist/typed/typeOf.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +77 -12
- package/dist/array/aggregate.cjs +0 -2
- package/dist/array/aggregate.cjs.map +0 -1
- package/dist/array/aggregate.js +0 -16
- package/dist/array/aggregate.js.map +0 -1
- package/dist/array/alternate.cjs +0 -2
- package/dist/array/alternate.cjs.map +0 -1
- package/dist/array/alternate.js +0 -9
- package/dist/array/alternate.js.map +0 -1
- package/dist/array/arrange.cjs +0 -2
- package/dist/array/arrange.cjs.map +0 -1
- package/dist/array/arrange.js +0 -6
- package/dist/array/arrange.js.map +0 -1
- package/dist/array/compact.cjs +0 -2
- package/dist/array/compact.cjs.map +0 -1
- package/dist/array/compact.js +0 -9
- package/dist/array/compact.js.map +0 -1
- package/dist/array/every.cjs +0 -2
- package/dist/array/every.cjs.map +0 -1
- package/dist/array/every.js +0 -14
- package/dist/array/every.js.map +0 -1
- package/dist/array/filter.cjs +0 -2
- package/dist/array/filter.cjs.map +0 -1
- package/dist/array/filter.js +0 -14
- package/dist/array/filter.js.map +0 -1
- package/dist/array/find.cjs +0 -2
- package/dist/array/find.cjs.map +0 -1
- package/dist/array/find.js +0 -14
- package/dist/array/find.js.map +0 -1
- package/dist/array/findIndex.cjs +0 -2
- package/dist/array/findIndex.cjs.map +0 -1
- package/dist/array/findIndex.js +0 -14
- package/dist/array/findIndex.js.map +0 -1
- package/dist/array/findLast.cjs +0 -2
- package/dist/array/findLast.cjs.map +0 -1
- package/dist/array/findLast.js +0 -14
- package/dist/array/findLast.js.map +0 -1
- package/dist/array/flatten.cjs +0 -2
- package/dist/array/flatten.cjs.map +0 -1
- package/dist/array/flatten.js +0 -7
- package/dist/array/flatten.js.map +0 -1
- package/dist/array/map.cjs +0 -2
- package/dist/array/map.cjs.map +0 -1
- package/dist/array/map.js +0 -18
- package/dist/array/map.js.map +0 -1
- package/dist/array/reduce.cjs +0 -2
- package/dist/array/reduce.cjs.map +0 -1
- package/dist/array/reduce.js +0 -16
- package/dist/array/reduce.js.map +0 -1
- package/dist/array/shift.cjs +0 -2
- package/dist/array/shift.cjs.map +0 -1
- package/dist/array/shift.js +0 -13
- package/dist/array/shift.js.map +0 -1
- package/dist/array/some.cjs +0 -2
- package/dist/array/some.cjs.map +0 -1
- package/dist/array/some.js +0 -14
- package/dist/array/some.js.map +0 -1
- package/dist/array/substitute.cjs +0 -2
- package/dist/array/substitute.cjs.map +0 -1
- package/dist/array/substitute.js +0 -13
- package/dist/array/substitute.js.map +0 -1
- package/dist/async/delay.cjs +0 -2
- package/dist/async/delay.cjs.map +0 -1
- package/dist/async/delay.js +0 -8
- package/dist/async/delay.js.map +0 -1
- package/dist/function/proxy.cjs +0 -2
- package/dist/function/proxy.cjs.map +0 -1
- package/dist/function/proxy.js +0 -22
- package/dist/function/proxy.js.map +0 -1
- package/dist/function/prune.cjs +0 -2
- package/dist/function/prune.cjs.map +0 -1
- package/dist/function/prune.js +0 -30
- package/dist/function/prune.js.map +0 -1
- package/dist/function/worker.cjs +0 -14
- package/dist/function/worker.cjs.map +0 -1
- package/dist/function/worker.js +0 -29
- package/dist/function/worker.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/logit/dist/logit.cjs +0 -2
- package/dist/logit/dist/logit.cjs.map +0 -1
- package/dist/logit/dist/logit.js +0 -263
- package/dist/logit/dist/logit.js.map +0 -1
- package/dist/math/add.cjs +0 -2
- package/dist/math/add.cjs.map +0 -1
- package/dist/math/add.js +0 -9
- package/dist/math/add.js.map +0 -1
- package/dist/math/boil.cjs +0 -2
- package/dist/math/boil.cjs.map +0 -1
- package/dist/math/boil.js +0 -17
- package/dist/math/boil.js.map +0 -1
- package/dist/math/divide.cjs +0 -2
- package/dist/math/divide.cjs.map +0 -1
- package/dist/math/divide.js +0 -11
- package/dist/math/divide.js.map +0 -1
- package/dist/math/multiply.cjs +0 -2
- package/dist/math/multiply.cjs.map +0 -1
- package/dist/math/multiply.js +0 -9
- package/dist/math/multiply.js.map +0 -1
- package/dist/math/rate.cjs +0 -2
- package/dist/math/rate.cjs.map +0 -1
- package/dist/math/rate.js +0 -9
- package/dist/math/rate.js.map +0 -1
- package/dist/math/subtract.cjs +0 -2
- package/dist/math/subtract.cjs.map +0 -1
- package/dist/math/subtract.js +0 -9
- package/dist/math/subtract.js.map +0 -1
- package/dist/object/cache.cjs +0 -2
- package/dist/object/cache.cjs.map +0 -1
- package/dist/object/cache.js +0 -63
- package/dist/object/cache.js.map +0 -1
- package/dist/object/clone.cjs +0 -2
- package/dist/object/clone.cjs.map +0 -1
- package/dist/object/clone.js +0 -17
- package/dist/object/clone.js.map +0 -1
- package/dist/object/entries.cjs +0 -2
- package/dist/object/entries.cjs.map +0 -1
- package/dist/object/entries.js +0 -9
- package/dist/object/entries.js.map +0 -1
- package/dist/object/keys.cjs +0 -2
- package/dist/object/keys.cjs.map +0 -1
- package/dist/object/keys.js +0 -9
- package/dist/object/keys.js.map +0 -1
- package/dist/object/values.cjs +0 -2
- package/dist/object/values.cjs.map +0 -1
- package/dist/object/values.js +0 -9
- package/dist/object/values.js.map +0 -1
- package/dist/typed/ge.cjs +0 -2
- package/dist/typed/ge.cjs.map +0 -1
- package/dist/typed/ge.js +0 -7
- package/dist/typed/ge.js.map +0 -1
- package/dist/typed/gt.cjs +0 -2
- package/dist/typed/gt.cjs.map +0 -1
- package/dist/typed/gt.js +0 -7
- package/dist/typed/gt.js.map +0 -1
- package/dist/typed/le.cjs +0 -2
- package/dist/typed/le.cjs.map +0 -1
- package/dist/typed/le.js +0 -7
- package/dist/typed/le.js.map +0 -1
- package/dist/typed/lt.cjs +0 -2
- package/dist/typed/lt.cjs.map +0 -1
- package/dist/typed/lt.js +0 -7
- package/dist/typed/lt.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isObject.d.ts","sourceRoot":"","sources":["../../src/typed/isObject.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED,eAAO,MAAM,mBAAmB,uBAAuB,CAAC"}
|
package/dist/typed/isObject.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/typed/isObject.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=isObject.js.map
|
|
5
|
+
var t = "Expected an object";
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as IS_OBJECT_ERROR_MSG, e as isObject };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=isObject.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isObject.js","sources":["../../src/typed/isObject.ts"],"sourcesContent":["/**\n * Determines if the passed value is an object.\n *\n * @example\n * ```ts\n * const value = { key: 'value' };\n * isObject(value); // true\n * isObject('hello world'); // false\n * isObject(value, 1); // false\n * isObject(value, value); // true\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is an object, else `false`.\n */\nexport function isObject(arg: unknown): arg is object {\n return typeof arg === 'object' && arg !== null && !Array.isArray(arg);\n}\n\nexport const IS_OBJECT_ERROR_MSG = 'Expected an object';\n"],"
|
|
1
|
+
{"version":3,"file":"isObject.js","names":[],"sources":["../../src/typed/isObject.ts"],"sourcesContent":["/**\n * Determines if the passed value is an object.\n *\n * @example\n * ```ts\n * const value = { key: 'value' };\n * isObject(value); // true\n * isObject('hello world'); // false\n * isObject(value, 1); // false\n * isObject(value, value); // true\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is an object, else `false`.\n */\nexport function isObject(arg: unknown): arg is object {\n return typeof arg === 'object' && arg !== null && !Array.isArray(arg);\n}\n\nexport const IS_OBJECT_ERROR_MSG = 'Expected an object';\n"],"mappings":";AAgBA,SAAgB,EAAS,GAA6B;AACpD,QAAO,OAAO,KAAQ,cAAY,KAAgB,CAAC,MAAM,QAAQ,EAAI;;AAGvE,IAAa,IAAsB"}
|
package/dist/typed/isOdd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=isOdd.cjs.map
|
|
1
|
+
function e(e){return typeof e==`number`&&Number.isInteger(e)&&e%2!=0}exports.isOdd=e;
|
|
2
|
+
//# sourceMappingURL=isOdd.cjs.map
|
package/dist/typed/isOdd.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isOdd.cjs","sources":["../../src/typed/isOdd.ts"],"sourcesContent":["/**\n * Checks if a number is odd.\n *\n * @param {number} arg - The number to check.\n *\n * @returns {boolean} - Returns true if the number is odd, otherwise false.\n */\nexport function isOdd(arg: unknown): arg is number {\n return typeof arg === 'number' && Number.
|
|
1
|
+
{"version":3,"file":"isOdd.cjs","names":[],"sources":["../../src/typed/isOdd.ts"],"sourcesContent":["/**\n * Checks if a number is odd.\n *\n * @param {number} arg - The number to check.\n *\n * @returns {boolean} - Returns true if the number is odd, otherwise false.\n */\nexport function isOdd(arg: unknown): arg is number {\n return typeof arg === 'number' && Number.isInteger(arg) && arg % 2 !== 0;\n}\n"],"mappings":"AAOA,SAAgB,EAAM,EAA6B,CACjD,OAAO,OAAO,GAAQ,UAAY,OAAO,UAAU,EAAI,EAAI,EAAM,GAAM"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a number is odd.
|
|
3
|
+
*
|
|
4
|
+
* @param {number} arg - The number to check.
|
|
5
|
+
*
|
|
6
|
+
* @returns {boolean} - Returns true if the number is odd, otherwise false.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isOdd(arg: unknown): arg is number;
|
|
9
|
+
//# sourceMappingURL=isOdd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isOdd.d.ts","sourceRoot":"","sources":["../../src/typed/isOdd.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEjD"}
|
package/dist/typed/isOdd.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/typed/isOdd.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return typeof e == "number" && Number.isInteger(e) && e % 2 != 0;
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=isOdd.js.map
|
|
5
|
+
//#endregion
|
|
6
|
+
export { e as isOdd };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=isOdd.js.map
|
package/dist/typed/isOdd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isOdd.js","sources":["../../src/typed/isOdd.ts"],"sourcesContent":["/**\n * Checks if a number is odd.\n *\n * @param {number} arg - The number to check.\n *\n * @returns {boolean} - Returns true if the number is odd, otherwise false.\n */\nexport function isOdd(arg: unknown): arg is number {\n return typeof arg === 'number' && Number.
|
|
1
|
+
{"version":3,"file":"isOdd.js","names":[],"sources":["../../src/typed/isOdd.ts"],"sourcesContent":["/**\n * Checks if a number is odd.\n *\n * @param {number} arg - The number to check.\n *\n * @returns {boolean} - Returns true if the number is odd, otherwise false.\n */\nexport function isOdd(arg: unknown): arg is number {\n return typeof arg === 'number' && Number.isInteger(arg) && arg % 2 !== 0;\n}\n"],"mappings":";AAOA,SAAgB,EAAM,GAA6B;AACjD,QAAO,OAAO,KAAQ,YAAY,OAAO,UAAU,EAAI,IAAI,IAAM,KAAM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=isPositive.cjs.map
|
|
1
|
+
function e(e){return typeof e==`number`&&e>0}exports.isPositive=e;
|
|
2
|
+
//# sourceMappingURL=isPositive.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPositive.cjs","sources":["../../src/typed/isPositive.ts"],"sourcesContent":["/**\n * Checks if the value is a positive number.\n *\n * @example\n * ```ts\n * isPositive(123); // true\n * isPositive(-123); // false\n * isPositive(0); // false\n * isPositive(0.1); // true\n * isPositive(-0.1); // false\n * isPositive('hello world'); // false\n * isPositive({}); // false\n * isPositive([]); // false\n * isPositive(new Date()); // false\n * isPositive(null); // false\n * isPositive(undefined); // false\n * isPositive(NaN); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a positive number, else `false`.\n *\n */\nexport function isPositive(arg: unknown): arg is number {\n return typeof arg === 'number' && arg > 0;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"isPositive.cjs","names":[],"sources":["../../src/typed/isPositive.ts"],"sourcesContent":["/**\n * Checks if the value is a positive number.\n *\n * @example\n * ```ts\n * isPositive(123); // true\n * isPositive(-123); // false\n * isPositive(0); // false\n * isPositive(0.1); // true\n * isPositive(-0.1); // false\n * isPositive('hello world'); // false\n * isPositive({}); // false\n * isPositive([]); // false\n * isPositive(new Date()); // false\n * isPositive(null); // false\n * isPositive(undefined); // false\n * isPositive(NaN); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a positive number, else `false`.\n *\n */\nexport function isPositive(arg: unknown): arg is number {\n return typeof arg === 'number' && arg > 0;\n}\n"],"mappings":"AAwBA,SAAgB,EAAW,EAA6B,CACtD,OAAO,OAAO,GAAQ,UAAY,EAAM"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the value is a positive number.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* isPositive(123); // true
|
|
7
|
+
* isPositive(-123); // false
|
|
8
|
+
* isPositive(0); // false
|
|
9
|
+
* isPositive(0.1); // true
|
|
10
|
+
* isPositive(-0.1); // false
|
|
11
|
+
* isPositive('hello world'); // false
|
|
12
|
+
* isPositive({}); // false
|
|
13
|
+
* isPositive([]); // false
|
|
14
|
+
* isPositive(new Date()); // false
|
|
15
|
+
* isPositive(null); // false
|
|
16
|
+
* isPositive(undefined); // false
|
|
17
|
+
* isPositive(NaN); // false
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @param arg - The argument to be checked.
|
|
21
|
+
*
|
|
22
|
+
* @returns `true` if the value is a positive number, else `false`.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export declare function isPositive(arg: unknown): arg is number;
|
|
26
|
+
//# sourceMappingURL=isPositive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPositive.d.ts","sourceRoot":"","sources":["../../src/typed/isPositive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEtD"}
|
package/dist/typed/isPositive.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/typed/isPositive.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return typeof e == "number" && e > 0;
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=isPositive.js.map
|
|
5
|
+
//#endregion
|
|
6
|
+
export { e as isPositive };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=isPositive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPositive.js","sources":["../../src/typed/isPositive.ts"],"sourcesContent":["/**\n * Checks if the value is a positive number.\n *\n * @example\n * ```ts\n * isPositive(123); // true\n * isPositive(-123); // false\n * isPositive(0); // false\n * isPositive(0.1); // true\n * isPositive(-0.1); // false\n * isPositive('hello world'); // false\n * isPositive({}); // false\n * isPositive([]); // false\n * isPositive(new Date()); // false\n * isPositive(null); // false\n * isPositive(undefined); // false\n * isPositive(NaN); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a positive number, else `false`.\n *\n */\nexport function isPositive(arg: unknown): arg is number {\n return typeof arg === 'number' && arg > 0;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"isPositive.js","names":[],"sources":["../../src/typed/isPositive.ts"],"sourcesContent":["/**\n * Checks if the value is a positive number.\n *\n * @example\n * ```ts\n * isPositive(123); // true\n * isPositive(-123); // false\n * isPositive(0); // false\n * isPositive(0.1); // true\n * isPositive(-0.1); // false\n * isPositive('hello world'); // false\n * isPositive({}); // false\n * isPositive([]); // false\n * isPositive(new Date()); // false\n * isPositive(null); // false\n * isPositive(undefined); // false\n * isPositive(NaN); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a positive number, else `false`.\n *\n */\nexport function isPositive(arg: unknown): arg is number {\n return typeof arg === 'number' && arg > 0;\n}\n"],"mappings":";AAwBA,SAAgB,EAAW,GAA6B;AACtD,QAAO,OAAO,KAAQ,YAAY,IAAM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=isPrimitive.cjs.map
|
|
1
|
+
function e(e){let t=typeof e;return t===`string`||t===`boolean`||t===`number`&&!Number.isNaN(e)}exports.isPrimitive=e;
|
|
2
|
+
//# sourceMappingURL=isPrimitive.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPrimitive.cjs","sources":["../../src/typed/isPrimitive.ts"],"sourcesContent":["/**\n * Type guard to check if a value is a primitive\n *\n * @example\n * ```ts\n * isPrimitive('Hello World'); // true\n * isPrimitive(42); // true\n * isPrimitive(true); // true\n * isPrimitive({}); // false\n * isPrimitive([]); // false\n * isPrimitive(() => {}); // false\n * ```\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a primitive, else `false`.\n */\nexport function isPrimitive(arg: unknown): arg is string | number | boolean {\n const type = typeof arg;\n return type === 'string' || type === 'boolean' || (type === 'number' && !Number.isNaN(arg));\n}\n
|
|
1
|
+
{"version":3,"file":"isPrimitive.cjs","names":[],"sources":["../../src/typed/isPrimitive.ts"],"sourcesContent":["/**\n * Type guard to check if a value is a primitive\n *\n * @example\n * ```ts\n * isPrimitive('Hello World'); // true\n * isPrimitive(42); // true\n * isPrimitive(true); // true\n * isPrimitive({}); // false\n * isPrimitive([]); // false\n * isPrimitive(() => {}); // false\n * ```\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a primitive, else `false`.\n */\nexport function isPrimitive(arg: unknown): arg is string | number | boolean {\n const type = typeof arg;\n\n return type === 'string' || type === 'boolean' || (type === 'number' && !Number.isNaN(arg));\n}\n"],"mappings":"AAgBA,SAAgB,EAAY,EAAgD,CAC1E,IAAM,EAAO,OAAO,EAEpB,OAAO,IAAS,UAAY,IAAS,WAAc,IAAS,UAAY,CAAC,OAAO,MAAM,EAAI"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type guard to check if a value is a primitive
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* isPrimitive('Hello World'); // true
|
|
7
|
+
* isPrimitive(42); // true
|
|
8
|
+
* isPrimitive(true); // true
|
|
9
|
+
* isPrimitive({}); // false
|
|
10
|
+
* isPrimitive([]); // false
|
|
11
|
+
* isPrimitive(() => {}); // false
|
|
12
|
+
* ```
|
|
13
|
+
* @param arg - The argument to be checked.
|
|
14
|
+
*
|
|
15
|
+
* @returns `true` if the value is a primitive, else `false`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isPrimitive(arg: unknown): arg is string | number | boolean;
|
|
18
|
+
//# sourceMappingURL=isPrimitive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPrimitive.d.ts","sourceRoot":"","sources":["../../src/typed/isPrimitive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,GAAG,MAAM,GAAG,OAAO,CAI1E"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/typed/isPrimitive.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = typeof e;
|
|
4
|
+
return t === "string" || t === "boolean" || t === "number" && !Number.isNaN(e);
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=isPrimitive.js.map
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as isPrimitive };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=isPrimitive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPrimitive.js","sources":["../../src/typed/isPrimitive.ts"],"sourcesContent":["/**\n * Type guard to check if a value is a primitive\n *\n * @example\n * ```ts\n * isPrimitive('Hello World'); // true\n * isPrimitive(42); // true\n * isPrimitive(true); // true\n * isPrimitive({}); // false\n * isPrimitive([]); // false\n * isPrimitive(() => {}); // false\n * ```\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a primitive, else `false`.\n */\nexport function isPrimitive(arg: unknown): arg is string | number | boolean {\n const type = typeof arg;\n return type === 'string' || type === 'boolean' || (type === 'number' && !Number.isNaN(arg));\n}\n
|
|
1
|
+
{"version":3,"file":"isPrimitive.js","names":[],"sources":["../../src/typed/isPrimitive.ts"],"sourcesContent":["/**\n * Type guard to check if a value is a primitive\n *\n * @example\n * ```ts\n * isPrimitive('Hello World'); // true\n * isPrimitive(42); // true\n * isPrimitive(true); // true\n * isPrimitive({}); // false\n * isPrimitive([]); // false\n * isPrimitive(() => {}); // false\n * ```\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a primitive, else `false`.\n */\nexport function isPrimitive(arg: unknown): arg is string | number | boolean {\n const type = typeof arg;\n\n return type === 'string' || type === 'boolean' || (type === 'number' && !Number.isNaN(arg));\n}\n"],"mappings":";AAgBA,SAAgB,EAAY,GAAgD;CAC1E,IAAM,IAAO,OAAO;AAEpB,QAAO,MAAS,YAAY,MAAS,aAAc,MAAS,YAAY,CAAC,OAAO,MAAM,EAAI"}
|
package/dist/typed/isPromise.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=isPromise.cjs.map
|
|
1
|
+
function e(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}exports.isPromise=e;
|
|
2
|
+
//# sourceMappingURL=isPromise.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPromise.cjs","sources":["../../src/typed/isPromise.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"isPromise.cjs","names":[],"sources":["../../src/typed/isPromise.ts"],"sourcesContent":["/**\n * Determines if the passed value is a Promise (or any thenable).\n *\n * @example\n * ```ts\n * isPromise(new Promise((resolve) => resolve(1))); // true\n * isPromise(asyncFn()); // true (calling it returns a Promise)\n * isPromise(async () => {}); // false (the function itself is not a Promise)\n * isPromise(() => {}); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a thenable, else `false`.\n */\nexport function isPromise(arg: unknown): arg is Promise<unknown> {\n return typeof arg === 'object' && arg !== null && typeof (arg as { then?: unknown }).then === 'function';\n}\n"],"mappings":"AAeA,SAAgB,EAAU,EAAuC,CAC/D,OAAO,OAAO,GAAQ,YAAY,GAAgB,OAAQ,EAA2B,MAAS"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines if the passed value is a Promise (or any thenable).
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* isPromise(new Promise((resolve) => resolve(1))); // true
|
|
7
|
+
* isPromise(asyncFn()); // true (calling it returns a Promise)
|
|
8
|
+
* isPromise(async () => {}); // false (the function itself is not a Promise)
|
|
9
|
+
* isPromise(() => {}); // false
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @param arg - The argument to be checked.
|
|
13
|
+
*
|
|
14
|
+
* @returns `true` if the value is a thenable, else `false`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isPromise(arg: unknown): arg is Promise<unknown>;
|
|
17
|
+
//# sourceMappingURL=isPromise.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPromise.d.ts","sourceRoot":"","sources":["../../src/typed/isPromise.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAE/D"}
|
package/dist/typed/isPromise.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
//#region src/typed/isPromise.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return typeof e == "object" && !!e && typeof e.then == "function";
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=isPromise.js.map
|
|
5
|
+
//#endregion
|
|
6
|
+
export { e as isPromise };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=isPromise.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPromise.js","sources":["../../src/typed/isPromise.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"isPromise.js","names":[],"sources":["../../src/typed/isPromise.ts"],"sourcesContent":["/**\n * Determines if the passed value is a Promise (or any thenable).\n *\n * @example\n * ```ts\n * isPromise(new Promise((resolve) => resolve(1))); // true\n * isPromise(asyncFn()); // true (calling it returns a Promise)\n * isPromise(async () => {}); // false (the function itself is not a Promise)\n * isPromise(() => {}); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a thenable, else `false`.\n */\nexport function isPromise(arg: unknown): arg is Promise<unknown> {\n return typeof arg === 'object' && arg !== null && typeof (arg as { then?: unknown }).then === 'function';\n}\n"],"mappings":";AAeA,SAAgB,EAAU,GAAuC;AAC/D,QAAO,OAAO,KAAQ,cAAY,KAAgB,OAAQ,EAA2B,QAAS"}
|
package/dist/typed/isRegex.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=isRegex.cjs.map
|
|
1
|
+
function e(e){return e instanceof RegExp}exports.isRegex=e;
|
|
2
|
+
//# sourceMappingURL=isRegex.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRegex.cjs","sources":["../../src/typed/isRegex.ts"],"sourcesContent":["/**\n * Checks if the provided argument is a regular expression.\n *\n * @example\n * ```ts\n * isRegex(/abc/); // true\n * isRegex(new RegExp('abc')); // true\n * isRegex('abc'); // false\n * isRegex(123); // false\n * isRegex({}); // false\n * isRegex([]); // false\n * isRegex(null); // false\n * isRegex(undefined); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @return `true` if the argument is a regular expression, otherwise `false`.\n */\nexport function isRegex(arg: unknown): arg is RegExp {\n return arg instanceof RegExp;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"isRegex.cjs","names":[],"sources":["../../src/typed/isRegex.ts"],"sourcesContent":["/**\n * Checks if the provided argument is a regular expression.\n *\n * @example\n * ```ts\n * isRegex(/abc/); // true\n * isRegex(new RegExp('abc')); // true\n * isRegex('abc'); // false\n * isRegex(123); // false\n * isRegex({}); // false\n * isRegex([]); // false\n * isRegex(null); // false\n * isRegex(undefined); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @return `true` if the argument is a regular expression, otherwise `false`.\n */\nexport function isRegex(arg: unknown): arg is RegExp {\n return arg instanceof RegExp;\n}\n"],"mappings":"AAmBA,SAAgB,EAAQ,EAA6B,CACnD,OAAO,aAAe"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the provided argument is a regular expression.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* isRegex(/abc/); // true
|
|
7
|
+
* isRegex(new RegExp('abc')); // true
|
|
8
|
+
* isRegex('abc'); // false
|
|
9
|
+
* isRegex(123); // false
|
|
10
|
+
* isRegex({}); // false
|
|
11
|
+
* isRegex([]); // false
|
|
12
|
+
* isRegex(null); // false
|
|
13
|
+
* isRegex(undefined); // false
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @param arg - The argument to be checked.
|
|
17
|
+
*
|
|
18
|
+
* @return `true` if the argument is a regular expression, otherwise `false`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isRegex(arg: unknown): arg is RegExp;
|
|
21
|
+
//# sourceMappingURL=isRegex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isRegex.d.ts","sourceRoot":"","sources":["../../src/typed/isRegex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEnD"}
|
package/dist/typed/isRegex.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/typed/isRegex.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e instanceof RegExp;
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=isRegex.js.map
|
|
5
|
+
//#endregion
|
|
6
|
+
export { e as isRegex };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=isRegex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRegex.js","sources":["../../src/typed/isRegex.ts"],"sourcesContent":["/**\n * Checks if the provided argument is a regular expression.\n *\n * @example\n * ```ts\n * isRegex(/abc/); // true\n * isRegex(new RegExp('abc')); // true\n * isRegex('abc'); // false\n * isRegex(123); // false\n * isRegex({}); // false\n * isRegex([]); // false\n * isRegex(null); // false\n * isRegex(undefined); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @return `true` if the argument is a regular expression, otherwise `false`.\n */\nexport function isRegex(arg: unknown): arg is RegExp {\n return arg instanceof RegExp;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"isRegex.js","names":[],"sources":["../../src/typed/isRegex.ts"],"sourcesContent":["/**\n * Checks if the provided argument is a regular expression.\n *\n * @example\n * ```ts\n * isRegex(/abc/); // true\n * isRegex(new RegExp('abc')); // true\n * isRegex('abc'); // false\n * isRegex(123); // false\n * isRegex({}); // false\n * isRegex([]); // false\n * isRegex(null); // false\n * isRegex(undefined); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @return `true` if the argument is a regular expression, otherwise `false`.\n */\nexport function isRegex(arg: unknown): arg is RegExp {\n return arg instanceof RegExp;\n}\n"],"mappings":";AAmBA,SAAgB,EAAQ,GAA6B;AACnD,QAAO,aAAe"}
|
package/dist/typed/isString.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=isString.cjs.map
|
|
1
|
+
function e(e){return typeof e==`string`}var t=`Expected a string`;exports.IS_STRING_ERROR_MSG=t,exports.isString=e;
|
|
2
|
+
//# sourceMappingURL=isString.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isString.cjs","sources":["../../src/typed/isString.ts"],"sourcesContent":["/**\n * Determines if the passed value is a String.\n *\n * @example\n * ```ts\n * isString('Hello World'); // true\n * isString(42); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a String, else `false`.\n */\nexport function isString(arg: unknown): arg is string {\n return typeof arg === 'string';\n}\n\nexport const IS_STRING_ERROR_MSG = 'Expected a string';\n"],"
|
|
1
|
+
{"version":3,"file":"isString.cjs","names":[],"sources":["../../src/typed/isString.ts"],"sourcesContent":["/**\n * Determines if the passed value is a String.\n *\n * @example\n * ```ts\n * isString('Hello World'); // true\n * isString(42); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a String, else `false`.\n */\nexport function isString(arg: unknown): arg is string {\n return typeof arg === 'string';\n}\n\nexport const IS_STRING_ERROR_MSG = 'Expected a string';\n"],"mappings":"AAaA,SAAgB,EAAS,EAA6B,CACpD,OAAO,OAAO,GAAQ,SAGxB,IAAa,EAAsB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines if the passed value is a String.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* isString('Hello World'); // true
|
|
7
|
+
* isString(42); // false
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @param arg - The argument to be checked.
|
|
11
|
+
*
|
|
12
|
+
* @returns `true` if the value is a String, else `false`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isString(arg: unknown): arg is string;
|
|
15
|
+
export declare const IS_STRING_ERROR_MSG = "Expected a string";
|
|
16
|
+
//# sourceMappingURL=isString.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isString.d.ts","sourceRoot":"","sources":["../../src/typed/isString.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED,eAAO,MAAM,mBAAmB,sBAAsB,CAAC"}
|
package/dist/typed/isString.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/typed/isString.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return typeof e == "string";
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=isString.js.map
|
|
5
|
+
var t = "Expected a string";
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as IS_STRING_ERROR_MSG, e as isString };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=isString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isString.js","sources":["../../src/typed/isString.ts"],"sourcesContent":["/**\n * Determines if the passed value is a String.\n *\n * @example\n * ```ts\n * isString('Hello World'); // true\n * isString(42); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a String, else `false`.\n */\nexport function isString(arg: unknown): arg is string {\n return typeof arg === 'string';\n}\n\nexport const IS_STRING_ERROR_MSG = 'Expected a string';\n"],"
|
|
1
|
+
{"version":3,"file":"isString.js","names":[],"sources":["../../src/typed/isString.ts"],"sourcesContent":["/**\n * Determines if the passed value is a String.\n *\n * @example\n * ```ts\n * isString('Hello World'); // true\n * isString(42); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is a String, else `false`.\n */\nexport function isString(arg: unknown): arg is string {\n return typeof arg === 'string';\n}\n\nexport const IS_STRING_ERROR_MSG = 'Expected a string';\n"],"mappings":";AAaA,SAAgB,EAAS,GAA6B;AACpD,QAAO,OAAO,KAAQ;;AAGxB,IAAa,IAAsB"}
|
package/dist/typed/isWithin.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=isWithin.cjs.map
|
|
1
|
+
const e=require(`./isNumber.cjs`);function t(t,n,r,i=!0){return!e.isNumber(t)||!e.isNumber(n)||!e.isNumber(r)?!1:i?t>=n&&t<=r:t>n&&t<r}var n=`Expected a number within a specified range`;exports.IS_WITHIN_ERROR_MSG=n,exports.isWithin=t;
|
|
2
|
+
//# sourceMappingURL=isWithin.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isWithin.cjs","sources":["../../src/typed/isWithin.ts"],"sourcesContent":["import { isNumber } from './isNumber';\n\n/**\n * Checks if a value is within a specified range.\n *\n * @example\n * ```ts\n * isWithin(1, 0, 1); // true\n * isWithin(1, 0, 1, false); // false\n * isWithin(0.5, 0, 1); // true\n * ```\n *\n * @param arg - The value to be checked.\n * @param min - The minimum value of the range.\n * @param max - The maximum value of the range.\n * @param inclusive - Whether the range is inclusive or exclusive. (defaults: `true`).\n *\n * @returns `true` if the value is in between, else `false`.\n */\nexport function isWithin(arg: unknown, min: unknown, max: unknown, inclusive = true): boolean {\n if (!isNumber(arg) || !isNumber(min) || !isNumber(max)) {\n return false;\n }\n return inclusive ? arg >= min && arg <= max : arg > min && arg < max;\n}\n\nexport const IS_WITHIN_ERROR_MSG = 'Expected a number within a specified range';\n"],"
|
|
1
|
+
{"version":3,"file":"isWithin.cjs","names":[],"sources":["../../src/typed/isWithin.ts"],"sourcesContent":["import { isNumber } from './isNumber';\n\n/**\n * Checks if a value is within a specified range.\n *\n * @example\n * ```ts\n * isWithin(1, 0, 1); // true\n * isWithin(1, 0, 1, false); // false\n * isWithin(0.5, 0, 1); // true\n * ```\n *\n * @param arg - The value to be checked.\n * @param min - The minimum value of the range.\n * @param max - The maximum value of the range.\n * @param inclusive - Whether the range is inclusive or exclusive. (defaults: `true`).\n *\n * @returns `true` if the value is in between, else `false`.\n */\nexport function isWithin(arg: unknown, min: unknown, max: unknown, inclusive = true): boolean {\n if (!isNumber(arg) || !isNumber(min) || !isNumber(max)) {\n return false;\n }\n\n return inclusive ? arg >= min && arg <= max : arg > min && arg < max;\n}\n\nexport const IS_WITHIN_ERROR_MSG = 'Expected a number within a specified range';\n"],"mappings":"kCAmBA,SAAgB,EAAS,EAAc,EAAc,EAAc,EAAY,GAAe,CAK5F,MAJI,CAAC,EAAA,SAAS,EAAI,EAAI,CAAC,EAAA,SAAS,EAAI,EAAI,CAAC,EAAA,SAAS,EAAI,CAC7C,GAGF,EAAY,GAAO,GAAO,GAAO,EAAM,EAAM,GAAO,EAAM,EAGnE,IAAa,EAAsB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a value is within a specified range.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* isWithin(1, 0, 1); // true
|
|
7
|
+
* isWithin(1, 0, 1, false); // false
|
|
8
|
+
* isWithin(0.5, 0, 1); // true
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @param arg - The value to be checked.
|
|
12
|
+
* @param min - The minimum value of the range.
|
|
13
|
+
* @param max - The maximum value of the range.
|
|
14
|
+
* @param inclusive - Whether the range is inclusive or exclusive. (defaults: `true`).
|
|
15
|
+
*
|
|
16
|
+
* @returns `true` if the value is in between, else `false`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isWithin(arg: unknown, min: unknown, max: unknown, inclusive?: boolean): boolean;
|
|
19
|
+
export declare const IS_WITHIN_ERROR_MSG = "Expected a number within a specified range";
|
|
20
|
+
//# sourceMappingURL=isWithin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isWithin.d.ts","sourceRoot":"","sources":["../../src/typed/isWithin.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,UAAO,GAAG,OAAO,CAM5F;AAED,eAAO,MAAM,mBAAmB,+CAA+C,CAAC"}
|
package/dist/typed/isWithin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { isNumber as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { isNumber as e } from "./isNumber.js";
|
|
2
|
+
//#region src/typed/isWithin.ts
|
|
3
|
+
function t(t, n, r, i = !0) {
|
|
4
|
+
return !e(t) || !e(n) || !e(r) ? !1 : i ? t >= n && t <= r : t > n && t < r;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=isWithin.js.map
|
|
6
|
+
var n = "Expected a number within a specified range";
|
|
7
|
+
//#endregion
|
|
8
|
+
export { n as IS_WITHIN_ERROR_MSG, t as isWithin };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=isWithin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isWithin.js","sources":["../../src/typed/isWithin.ts"],"sourcesContent":["import { isNumber } from './isNumber';\n\n/**\n * Checks if a value is within a specified range.\n *\n * @example\n * ```ts\n * isWithin(1, 0, 1); // true\n * isWithin(1, 0, 1, false); // false\n * isWithin(0.5, 0, 1); // true\n * ```\n *\n * @param arg - The value to be checked.\n * @param min - The minimum value of the range.\n * @param max - The maximum value of the range.\n * @param inclusive - Whether the range is inclusive or exclusive. (defaults: `true`).\n *\n * @returns `true` if the value is in between, else `false`.\n */\nexport function isWithin(arg: unknown, min: unknown, max: unknown, inclusive = true): boolean {\n if (!isNumber(arg) || !isNumber(min) || !isNumber(max)) {\n return false;\n }\n return inclusive ? arg >= min && arg <= max : arg > min && arg < max;\n}\n\nexport const IS_WITHIN_ERROR_MSG = 'Expected a number within a specified range';\n"],"
|
|
1
|
+
{"version":3,"file":"isWithin.js","names":[],"sources":["../../src/typed/isWithin.ts"],"sourcesContent":["import { isNumber } from './isNumber';\n\n/**\n * Checks if a value is within a specified range.\n *\n * @example\n * ```ts\n * isWithin(1, 0, 1); // true\n * isWithin(1, 0, 1, false); // false\n * isWithin(0.5, 0, 1); // true\n * ```\n *\n * @param arg - The value to be checked.\n * @param min - The minimum value of the range.\n * @param max - The maximum value of the range.\n * @param inclusive - Whether the range is inclusive or exclusive. (defaults: `true`).\n *\n * @returns `true` if the value is in between, else `false`.\n */\nexport function isWithin(arg: unknown, min: unknown, max: unknown, inclusive = true): boolean {\n if (!isNumber(arg) || !isNumber(min) || !isNumber(max)) {\n return false;\n }\n\n return inclusive ? arg >= min && arg <= max : arg > min && arg < max;\n}\n\nexport const IS_WITHIN_ERROR_MSG = 'Expected a number within a specified range';\n"],"mappings":";;AAmBA,SAAgB,EAAS,GAAc,GAAc,GAAc,IAAY,IAAe;AAK5F,QAJI,CAAC,EAAS,EAAI,IAAI,CAAC,EAAS,EAAI,IAAI,CAAC,EAAS,EAAI,GAC7C,KAGF,IAAY,KAAO,KAAO,KAAO,IAAM,IAAM,KAAO,IAAM;;AAGnE,IAAa,IAAsB"}
|
package/dist/typed/isZero.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=isZero.cjs.map
|
|
1
|
+
function e(e){return typeof e==`number`&&e===0}exports.isZero=e;
|
|
2
|
+
//# sourceMappingURL=isZero.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isZero.cjs","sources":["../../src/typed/isZero.ts"],"sourcesContent":["/**\n * Checks if the value is
|
|
1
|
+
{"version":3,"file":"isZero.cjs","names":[],"sources":["../../src/typed/isZero.ts"],"sourcesContent":["/**\n * Checks if the value is zero.\n *\n * @example\n * ```ts\n * isZero(0); // true\n * isZero(123); // false\n * isZero(-123); // false\n * isZero(0.0000001); // false\n * isZero('hello world'); // false\n * isZero({}); // false\n * isZero([]); // false\n * isZero(new Date()); // false\n * isZero(null); // false\n * isZero(undefined); // false\n * isZero(NaN); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is zero, else `false`.\n *\n */\nexport function isZero(arg: unknown): arg is number {\n return typeof arg === 'number' && arg === 0;\n}\n"],"mappings":"AAuBA,SAAgB,EAAO,EAA6B,CAClD,OAAO,OAAO,GAAQ,UAAY,IAAQ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the value is zero.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* isZero(0); // true
|
|
7
|
+
* isZero(123); // false
|
|
8
|
+
* isZero(-123); // false
|
|
9
|
+
* isZero(0.0000001); // false
|
|
10
|
+
* isZero('hello world'); // false
|
|
11
|
+
* isZero({}); // false
|
|
12
|
+
* isZero([]); // false
|
|
13
|
+
* isZero(new Date()); // false
|
|
14
|
+
* isZero(null); // false
|
|
15
|
+
* isZero(undefined); // false
|
|
16
|
+
* isZero(NaN); // false
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param arg - The argument to be checked.
|
|
20
|
+
*
|
|
21
|
+
* @returns `true` if the value is zero, else `false`.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare function isZero(arg: unknown): arg is number;
|
|
25
|
+
//# sourceMappingURL=isZero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isZero.d.ts","sourceRoot":"","sources":["../../src/typed/isZero.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAElD"}
|
package/dist/typed/isZero.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/typed/isZero.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return typeof e == "number" && e === 0;
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=isZero.js.map
|
|
5
|
+
//#endregion
|
|
6
|
+
export { e as isZero };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=isZero.js.map
|
package/dist/typed/isZero.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isZero.js","sources":["../../src/typed/isZero.ts"],"sourcesContent":["/**\n * Checks if the value is
|
|
1
|
+
{"version":3,"file":"isZero.js","names":[],"sources":["../../src/typed/isZero.ts"],"sourcesContent":["/**\n * Checks if the value is zero.\n *\n * @example\n * ```ts\n * isZero(0); // true\n * isZero(123); // false\n * isZero(-123); // false\n * isZero(0.0000001); // false\n * isZero('hello world'); // false\n * isZero({}); // false\n * isZero([]); // false\n * isZero(new Date()); // false\n * isZero(null); // false\n * isZero(undefined); // false\n * isZero(NaN); // false\n * ```\n *\n * @param arg - The argument to be checked.\n *\n * @returns `true` if the value is zero, else `false`.\n *\n */\nexport function isZero(arg: unknown): arg is number {\n return typeof arg === 'number' && arg === 0;\n}\n"],"mappings":";AAuBA,SAAgB,EAAO,GAA6B;AAClD,QAAO,OAAO,KAAQ,YAAY,MAAQ"}
|
package/dist/typed/typeOf.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=typeOf.cjs.map
|
|
1
|
+
function e(e){if(e===null)return`null`;if(e===void 0)return`undefined`;if(typeof e==`number`&&Number.isNaN(e))return`nan`;let t=Object.prototype.toString.call(e).slice(8,-1);return t===`AsyncFunction`?`function`:t.toLowerCase()}exports.typeOf=e;
|
|
2
|
+
//# sourceMappingURL=typeOf.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeOf.cjs","sources":["../../src/typed/typeOf.ts"],"sourcesContent":["export type ArgType =\n | 'array'\n | 'boolean'\n | 'date'\n | 'error'\n | 'function'\n | 'map'\n | 'nan'\n | 'null'\n | 'number'\n | 'object'\n | 'promise'\n | 'regexp'\n | 'set'\n | 'string'\n | 'symbol'\n | 'weakmap'\n | 'weakset'\n | 'undefined';\n\n
|
|
1
|
+
{"version":3,"file":"typeOf.cjs","names":[],"sources":["../../src/typed/typeOf.ts"],"sourcesContent":["export type ArgType =\n | 'array'\n | 'boolean'\n | 'date'\n | 'error'\n | 'function'\n | 'map'\n | 'nan'\n | 'null'\n | 'number'\n | 'object'\n | 'promise'\n | 'regexp'\n | 'set'\n | 'string'\n | 'symbol'\n | 'weakmap'\n | 'weakset'\n | 'undefined';\n\n/**\n * Returns the type of the given argument.\n *\n * @example\n * ```ts\n * typeOf(null); // 'null'\n * typeOf(undefined); // 'undefined'\n * typeOf(NaN); // 'nan'\n * typeOf(async function() {}); // 'function'\n * typeOf(123); // 'number'\n * typeOf('abc'); // 'string'\n * typeOf({}); // 'object'\n * typeOf([]); // 'array'\n * typeOf(() => {}); // 'function'\n * typeOf(new Date()); // 'date'\n * typeOf(new Error()); // 'error'\n * typeOf(new Map()); // 'map'\n * typeOf(new Set()); // 'set'\n * typeOf(new WeakMap()); // 'weakmap'\n * typeOf(new WeakSet()); // 'weakset'\n * typeOf(new RegExp('')); // 'regexp'\n * ```\n *\n * @param arg - The argument whose type is to be determined.\n *\n * @returns The type of the argument.\n */\nexport function typeOf(arg: unknown): ArgType {\n if (arg === null) return 'null';\n\n if (arg === undefined) return 'undefined';\n\n if (typeof arg === 'number' && Number.isNaN(arg)) return 'nan';\n\n const type = Object.prototype.toString.call(arg).slice(8, -1);\n\n return (type === 'AsyncFunction' ? 'function' : type.toLowerCase()) as ArgType;\n}\n"],"mappings":"AA+CA,SAAgB,EAAO,EAAuB,CAC5C,GAAI,IAAQ,KAAM,MAAO,OAEzB,GAAI,IAAQ,IAAA,GAAW,MAAO,YAE9B,GAAI,OAAO,GAAQ,UAAY,OAAO,MAAM,EAAI,CAAE,MAAO,MAEzD,IAAM,EAAO,OAAO,UAAU,SAAS,KAAK,EAAI,CAAC,MAAM,EAAG,GAAG,CAE7D,OAAQ,IAAS,gBAAkB,WAAa,EAAK,aAAa"}
|