@vinicunca/perkakas 1.0.4 → 1.0.6
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/add-prop.d.cts +1 -1
- package/dist/add-prop.d.ts +1 -1
- package/dist/{chunk-LG37S75J.js → chunk-23TPDBES.js} +1 -1
- package/dist/chunk-46GBCFAG.js +1 -0
- package/dist/chunk-5SEDUH3U.cjs +1 -0
- package/dist/{chunk-A62OZTSJ.js → chunk-6B6SBF6V.js} +1 -1
- package/dist/chunk-AFO7BV2X.js +1 -0
- package/dist/chunk-AQRYBCA3.cjs +1 -0
- package/dist/{chunk-7IYJC2PM.cjs → chunk-C6NFG7IS.cjs} +1 -1
- package/dist/chunk-CRWFVSUP.cjs +1 -0
- package/dist/{chunk-U32YSACL.cjs → chunk-CT4EPN4Q.cjs} +1 -1
- package/dist/{chunk-A6WT2DZU.cjs → chunk-D774SJZI.cjs} +1 -1
- package/dist/chunk-DQ5MWM7I.cjs +1 -0
- package/dist/{chunk-BF6VQFQK.js → chunk-FFGIG2SO.js} +1 -1
- package/dist/{chunk-6ALZHU2N.js → chunk-FOP5KNRT.js} +1 -1
- package/dist/chunk-G5M5BNF3.cjs +1 -0
- package/dist/{chunk-PKGL5JK6.js → chunk-HBSV33EM.js} +1 -1
- package/dist/chunk-HXYRD63B.cjs +1 -0
- package/dist/chunk-IOSBDH5J.cjs +1 -0
- package/dist/{chunk-IZZFU26S.cjs → chunk-K43ZLBUS.cjs} +1 -1
- package/dist/{chunk-Z5UEQBZP.cjs → chunk-LBLAWGUH.cjs} +1 -1
- package/dist/chunk-LCHZ57HW.js +1 -0
- package/dist/chunk-LWCPA2K5.cjs +1 -0
- package/dist/chunk-MUD45PL6.js +1 -0
- package/dist/chunk-NWEPH7CD.cjs +1 -0
- package/dist/chunk-QIZDLB7Z.js +1 -0
- package/dist/chunk-QT66COHU.js +1 -0
- package/dist/chunk-RJ4SY2RW.js +1 -0
- package/dist/chunk-S4XCRT2B.cjs +1 -0
- package/dist/{chunk-BGPRJNRQ.js → chunk-SOCUEKNU.js} +1 -1
- package/dist/{chunk-C6L5NLLB.js → chunk-SS3ILCPB.js} +1 -1
- package/dist/{chunk-NLX7PGPI.cjs → chunk-SU7H3HVP.cjs} +1 -1
- package/dist/{chunk-3X6SAJDQ.cjs → chunk-SW6GJ7UA.cjs} +1 -1
- package/dist/chunk-T4LCVT74.js +1 -0
- package/dist/chunk-TYOJTJP6.js +1 -0
- package/dist/chunk-VPLMRR25.cjs +1 -0
- package/dist/{chunk-EPHUNAE5.js → chunk-WDT4BJAH.js} +1 -1
- package/dist/{chunk-MLLA7SGZ.cjs → chunk-WYRK6YJU.cjs} +1 -1
- package/dist/chunk-XYMW4QIS.js +1 -0
- package/dist/chunk-Y5OLUMVB.js +1 -0
- package/dist/{chunk-LSXNPOLD.js → chunk-Y7ACNJIO.js} +1 -1
- package/dist/{chunk-I6VXEY44.cjs → chunk-Y7L64OLN.cjs} +1 -1
- package/dist/chunk.d.cts +1 -1
- package/dist/chunk.d.ts +1 -1
- package/dist/concat.d.cts +1 -1
- package/dist/concat.d.ts +1 -1
- package/dist/conditional.d.cts +1 -1
- package/dist/conditional.d.ts +1 -1
- package/dist/conditional.spec-d.cjs +1 -1
- package/dist/conditional.spec-d.js +1 -1
- package/dist/debounce.spec-d.cjs +1 -1
- package/dist/debounce.spec-d.js +1 -1
- package/dist/difference-with.cjs +1 -1
- package/dist/difference-with.js +1 -1
- package/dist/difference.cjs +1 -1
- package/dist/difference.js +1 -1
- package/dist/do-nothing.cjs +1 -1
- package/dist/do-nothing.d.cts +1 -1
- package/dist/do-nothing.d.ts +1 -1
- package/dist/do-nothing.js +1 -1
- package/dist/do-nothing.spec-d.cjs +1 -1
- package/dist/do-nothing.spec-d.js +1 -1
- package/dist/drop-first-by.d.cts +1 -1
- package/dist/drop-first-by.d.ts +1 -1
- package/dist/drop-last-while.d.cts +1 -1
- package/dist/drop-last-while.d.ts +1 -1
- package/dist/drop-last-while.spec-d.cjs +1 -1
- package/dist/drop-last-while.spec-d.js +1 -1
- package/dist/drop-last.d.cts +1 -1
- package/dist/drop-last.d.ts +1 -1
- package/dist/drop-last.spec-d.cjs +1 -1
- package/dist/drop-last.spec-d.js +1 -1
- package/dist/drop-while.d.cts +1 -1
- package/dist/drop-while.d.ts +1 -1
- package/dist/drop-while.spec-d.cjs +1 -1
- package/dist/drop-while.spec-d.js +1 -1
- package/dist/drop.cjs +1 -1
- package/dist/drop.d.cts +20 -7
- package/dist/drop.d.ts +20 -7
- package/dist/drop.js +1 -1
- package/dist/drop.spec-d.cjs +1 -1
- package/dist/drop.spec-d.js +1 -1
- package/dist/evolve.d.cts +1 -1
- package/dist/evolve.d.ts +1 -1
- package/dist/evolve.spec-d.cjs +1 -1
- package/dist/evolve.spec-d.js +1 -1
- package/dist/filter.cjs +1 -1
- package/dist/filter.js +1 -1
- package/dist/filter.spec-d.cjs +1 -1
- package/dist/filter.spec-d.js +1 -1
- package/dist/find.cjs +1 -1
- package/dist/find.js +1 -1
- package/dist/find.spec-d.cjs +1 -1
- package/dist/find.spec-d.js +1 -1
- package/dist/first-by.d.cts +1 -1
- package/dist/first-by.d.ts +1 -1
- package/dist/first-by.spec-d.cjs +1 -1
- package/dist/first-by.spec-d.js +1 -1
- package/dist/first.d.cts +1 -1
- package/dist/first.d.ts +1 -1
- package/dist/flat.cjs +1 -1
- package/dist/flat.d.cts +1 -1
- package/dist/flat.d.ts +1 -1
- package/dist/flat.js +1 -1
- package/dist/flat.spec-d.cjs +1 -1
- package/dist/flat.spec-d.js +1 -1
- package/dist/for-each-obj.d.cts +1 -1
- package/dist/for-each-obj.d.ts +1 -1
- package/dist/for-each-obj.spec-d.cjs +1 -1
- package/dist/for-each-obj.spec-d.js +1 -1
- package/dist/for-each.d.cts +1 -1
- package/dist/for-each.d.ts +1 -1
- package/dist/for-each.spec-d.cjs +1 -1
- package/dist/for-each.spec-d.js +1 -1
- package/dist/from-entries.d.cts +1 -1
- package/dist/from-entries.d.ts +1 -1
- package/dist/from-keys.d.cts +1 -1
- package/dist/from-keys.d.ts +1 -1
- package/dist/from-keys.spec-d.cjs +1 -1
- package/dist/from-keys.spec-d.js +1 -1
- package/dist/group-by.d.cts +1 -1
- package/dist/group-by.d.ts +1 -1
- package/dist/has-at-least.d.cts +1 -1
- package/dist/has-at-least.d.ts +1 -1
- package/dist/has-sub-object.d.cts +1 -1
- package/dist/has-sub-object.d.ts +1 -1
- package/dist/has-sub-object.spec-d.cjs +1 -1
- package/dist/has-sub-object.spec-d.js +1 -1
- package/dist/human-readable-file-size.d.cts +1 -0
- package/dist/human-readable-file-size.d.ts +1 -0
- package/dist/identity.cjs +1 -1
- package/dist/identity.d.cts +1 -1
- package/dist/identity.d.ts +1 -1
- package/dist/identity.js +1 -1
- package/dist/identity.spec-d.cjs +1 -1
- package/dist/identity.spec-d.js +1 -1
- package/dist/index-by.d.cts +1 -1
- package/dist/index-by.d.ts +1 -1
- package/dist/index-by.spec-d.cjs +1 -1
- package/dist/index-by.spec-d.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/intersection-with.cjs +1 -1
- package/dist/intersection-with.js +1 -1
- package/dist/intersection.cjs +1 -1
- package/dist/intersection.js +1 -1
- package/dist/intersection.spec-d.cjs +1 -1
- package/dist/intersection.spec-d.js +1 -1
- package/dist/is-array.d.cts +1 -1
- package/dist/is-array.d.ts +1 -1
- package/dist/is-big-int.d.cts +1 -1
- package/dist/is-big-int.d.ts +1 -1
- package/dist/is-boolean.d.cts +1 -1
- package/dist/is-boolean.d.ts +1 -1
- package/dist/is-deep-equal.spec-d.cjs +1 -1
- package/dist/is-deep-equal.spec-d.js +1 -1
- package/dist/is-empty.d.cts +1 -1
- package/dist/is-empty.d.ts +1 -1
- package/dist/is-included-in.d.cts +1 -1
- package/dist/is-included-in.d.ts +1 -1
- package/dist/is-nullish.d.cts +1 -1
- package/dist/is-nullish.d.ts +1 -1
- package/dist/is-number.d.cts +1 -1
- package/dist/is-number.d.ts +1 -1
- package/dist/is-object-type.d.cts +1 -1
- package/dist/is-object-type.d.ts +1 -1
- package/dist/is-plain-object.d.cts +1 -1
- package/dist/is-plain-object.d.ts +1 -1
- package/dist/is-shallow-equal.spec-d.cjs +1 -1
- package/dist/is-shallow-equal.spec-d.js +1 -1
- package/dist/is-strict-equal.spec-d.cjs +1 -1
- package/dist/is-strict-equal.spec-d.js +1 -1
- package/dist/is-string.d.cts +1 -1
- package/dist/is-string.d.ts +1 -1
- package/dist/is-symbol.d.cts +1 -1
- package/dist/is-symbol.d.ts +1 -1
- package/dist/keys.d.cts +1 -1
- package/dist/keys.d.ts +1 -1
- package/dist/keys.spec-d.cjs +1 -1
- package/dist/keys.spec-d.js +1 -1
- package/dist/last.d.cts +1 -1
- package/dist/last.d.ts +1 -1
- package/dist/last.spec-d.cjs +1 -1
- package/dist/last.spec-d.js +1 -1
- package/dist/map-keys.d.cts +1 -1
- package/dist/map-keys.d.ts +1 -1
- package/dist/map-keys.spec-d.cjs +1 -1
- package/dist/map-keys.spec-d.js +1 -1
- package/dist/map-values.d.cts +1 -1
- package/dist/map-values.d.ts +1 -1
- package/dist/map-values.spec-d.cjs +1 -1
- package/dist/map-values.spec-d.js +1 -1
- package/dist/map-with-feedback.cjs +1 -1
- package/dist/map-with-feedback.d.cts +1 -1
- package/dist/map-with-feedback.d.ts +1 -1
- package/dist/map-with-feedback.js +1 -1
- package/dist/map-with-feedback.spec-d.cjs +1 -1
- package/dist/map-with-feedback.spec-d.js +1 -1
- package/dist/map.d.cts +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/nth-by.d.cts +1 -1
- package/dist/nth-by.d.ts +1 -1
- package/dist/nth-by.spec-d.cjs +1 -1
- package/dist/nth-by.spec-d.js +1 -1
- package/dist/omit-by.d.cts +1 -1
- package/dist/omit-by.d.ts +1 -1
- package/dist/omit-by.spec-d.cjs +1 -1
- package/dist/omit-by.spec-d.js +1 -1
- package/dist/omit.spec-d.cjs +1 -1
- package/dist/omit.spec-d.js +1 -1
- package/dist/only.d.cts +1 -1
- package/dist/only.d.ts +1 -1
- package/dist/partition.spec-d.cjs +1 -1
- package/dist/partition.spec-d.js +1 -1
- package/dist/pick-by.d.cts +1 -1
- package/dist/pick-by.d.ts +1 -1
- package/dist/pick-by.spec-d.cjs +1 -1
- package/dist/pick-by.spec-d.js +1 -1
- package/dist/pick.spec-d.cjs +1 -1
- package/dist/pick.spec-d.js +1 -1
- package/dist/pipe.cjs +1 -1
- package/dist/pipe.js +1 -1
- package/dist/piped.cjs +1 -1
- package/dist/piped.js +1 -1
- package/dist/product.d.cts +1 -1
- package/dist/product.d.ts +1 -1
- package/dist/product.spec-d.cjs +1 -1
- package/dist/product.spec-d.js +1 -1
- package/dist/prop.spec-d.cjs +1 -1
- package/dist/prop.spec-d.js +1 -1
- package/dist/pull-object.d.cts +1 -1
- package/dist/pull-object.d.ts +1 -1
- package/dist/pull-object.spec-d.cjs +1 -1
- package/dist/pull-object.spec-d.js +1 -1
- package/dist/random-integer.cjs +1 -0
- package/dist/random-integer.d.cts +20 -0
- package/dist/random-integer.d.ts +20 -0
- package/dist/random-integer.js +1 -0
- package/dist/random-integer.spec-d.cjs +1 -0
- package/dist/random-integer.spec-d.d.cts +2 -0
- package/dist/random-integer.spec-d.d.ts +2 -0
- package/dist/random-integer.spec-d.js +1 -0
- package/dist/rank-by.d.cts +1 -1
- package/dist/rank-by.d.ts +1 -1
- package/dist/reverse.spec-d.cjs +1 -1
- package/dist/reverse.spec-d.js +1 -1
- package/dist/sample.d.cts +1 -1
- package/dist/sample.d.ts +1 -1
- package/dist/set-path.spec-d.cjs +1 -1
- package/dist/set-path.spec-d.js +1 -1
- package/dist/set.d.cts +1 -1
- package/dist/set.d.ts +1 -1
- package/dist/shuffle.d.cts +1 -1
- package/dist/shuffle.d.ts +1 -1
- package/dist/shuffle.spec-d.cjs +1 -1
- package/dist/shuffle.spec-d.js +1 -1
- package/dist/sort-by.d.cts +1 -1
- package/dist/sort-by.d.ts +1 -1
- package/dist/sort-by.spec-d.cjs +1 -1
- package/dist/sort-by.spec-d.js +1 -1
- package/dist/sort.d.cts +1 -1
- package/dist/sort.d.ts +1 -1
- package/dist/sum.d.cts +1 -1
- package/dist/sum.d.ts +1 -1
- package/dist/sum.spec-d.cjs +1 -1
- package/dist/sum.spec-d.js +1 -1
- package/dist/swap-indices.d.cts +1 -1
- package/dist/swap-indices.d.ts +1 -1
- package/dist/take-first-by.d.cts +1 -1
- package/dist/take-first-by.d.ts +1 -1
- package/dist/take-last-while.d.cts +1 -1
- package/dist/take-last-while.d.ts +1 -1
- package/dist/take-last-while.spec-d-.cjs +1 -1
- package/dist/take-last-while.spec-d-.js +1 -1
- package/dist/take-last.d.cts +1 -1
- package/dist/take-last.d.ts +1 -1
- package/dist/take-last.spec-d.cjs +1 -1
- package/dist/take-last.spec-d.js +1 -1
- package/dist/take-while.d.cts +1 -1
- package/dist/take-while.d.ts +1 -1
- package/dist/take-white.spec-d.cjs +1 -1
- package/dist/take-white.spec-d.js +1 -1
- package/dist/take.cjs +1 -1
- package/dist/take.d.cts +1 -1
- package/dist/take.d.ts +1 -1
- package/dist/take.js +1 -1
- package/dist/take.spec-d.cjs +1 -1
- package/dist/take.spec-d.js +1 -1
- package/dist/tap.spec-d.cjs +1 -1
- package/dist/tap.spec-d.js +1 -1
- package/dist/times.spec-d.cjs +1 -1
- package/dist/times.spec-d.js +1 -1
- package/dist/{types-BE3YOWVA.d.cts → types-CC8iZVKO.d.cts} +12 -2
- package/dist/{types-BE3YOWVA.d.ts → types-CC8iZVKO.d.ts} +12 -2
- package/dist/unique-by.cjs +1 -1
- package/dist/unique-by.d.cts +1 -1
- package/dist/unique-by.d.ts +1 -1
- package/dist/unique-by.js +1 -1
- package/dist/unique-with.cjs +1 -1
- package/dist/unique-with.d.cts +1 -1
- package/dist/unique-with.d.ts +1 -1
- package/dist/unique-with.js +1 -1
- package/dist/unique.cjs +1 -1
- package/dist/unique.d.cts +1 -1
- package/dist/unique.d.ts +1 -1
- package/dist/unique.js +1 -1
- package/dist/values.d.cts +1 -1
- package/dist/values.d.ts +1 -1
- package/dist/values.spec-d.cjs +1 -1
- package/dist/values.spec-d.js +1 -1
- package/dist/zip-with.d.cts +1 -1
- package/dist/zip-with.d.ts +1 -1
- package/dist/zip-with.spec-d.cjs +1 -1
- package/dist/zip-with.spec-d.js +1 -1
- package/dist/zip.d.cts +1 -1
- package/dist/zip.d.ts +1 -1
- package/dist/zip.spec-d.cjs +1 -1
- package/dist/zip.spec-d.js +1 -1
- package/package.json +14 -13
- package/dist/chunk-A535Z4LW.cjs +0 -1
- package/dist/chunk-AKGWT6GC.js +0 -1
- package/dist/chunk-BRLENORL.js +0 -1
- package/dist/chunk-E6RBEL5Z.cjs +0 -1
- package/dist/chunk-EKYCE7XE.cjs +0 -1
- package/dist/chunk-FNZCH7TN.cjs +0 -1
- package/dist/chunk-GNPFJJSC.cjs +0 -1
- package/dist/chunk-HTO3K3VA.cjs +0 -1
- package/dist/chunk-IRH6TGG5.js +0 -1
- package/dist/chunk-JLRJ44YR.js +0 -1
- package/dist/chunk-KITVKWLP.cjs +0 -1
- package/dist/chunk-MADDQNAR.cjs +0 -1
- package/dist/chunk-MYLYERXO.js +0 -1
- package/dist/chunk-NULDWRPD.cjs +0 -1
- package/dist/chunk-PHKKU45J.js +0 -1
- package/dist/chunk-RCENCAXY.cjs +0 -1
- package/dist/chunk-UNKQWZT6.js +0 -1
- package/dist/chunk-WQDEYM64.js +0 -1
- package/dist/chunk-WRKGH4XX.js +0 -1
- package/dist/chunk-WUAU3LTQ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-MKM3UJUV.js";import{a as c}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-MKM3UJUV.js";import{a as c}from"./chunk-46GBCFAG.js";import{a as n}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import{a as e}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("string keys",()=>{let t=["a","b"],s=a(t,c(),e("value"));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e("value")));expectTypeOf(o).toEqualTypeOf()});test("number keys",()=>{let t=[1,2],s=a(t,c(),e(3));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e(3)));expectTypeOf(o).toEqualTypeOf()});test("symbol keys",()=>{let t=[Symbol("a"),Symbol("b")],s=a(t,c(),e(Symbol("c")));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e(Symbol("c"))));expectTypeOf(o).toEqualTypeOf()});test("number constants",()=>{let t=[1,2],s=a(t,c(),e(3));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e(3)));expectTypeOf(o).toEqualTypeOf()});test("string constants",()=>{let t=["a","b"],s=a(t,c(),e("c"));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e("c")));expectTypeOf(o).toEqualTypeOf()});test("literal unions keys",()=>{let t=[1,2],s=a(t,r=>r%2===0?"odd":"even",e("c"));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(r=>r%2===0?"odd":"even",e("c")));expectTypeOf(o).toEqualTypeOf()});test("template string keys",()=>{let t=[1,2],s=a(t,r=>`prefix_${r}`,e("value"));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(r=>`prefix_${r}`,e("value")));expectTypeOf(o).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIOSBDH5Jcjs = require('./chunk-IOSBDH5J.cjs');exports.randomInteger = _chunkIOSBDH5Jcjs.a;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Or, IsNever, NonNegativeInteger, IsEqual, GreaterThan, GreaterThanOrEqual, IntRange } from 'type-fest';
|
|
2
|
+
|
|
3
|
+
type RandomInteger<From extends number, To extends number> = Or<IsNever<NonNegativeInteger<From>>, IsNever<NonNegativeInteger<To>>> extends true ? number : IsEqual<From, To> extends true ? From : GreaterThan<From, To> extends true ? never : GreaterThanOrEqual<To, 1000> extends true ? number : IntRange<From, To> | To;
|
|
4
|
+
/**
|
|
5
|
+
* Generate a random integer between `from` and `to` (inclusive).
|
|
6
|
+
*
|
|
7
|
+
* @param from - The minimum value.
|
|
8
|
+
* @param to - The maximum value.
|
|
9
|
+
* @returns The random integer.
|
|
10
|
+
* @signature
|
|
11
|
+
* P.randomInt(from, to)
|
|
12
|
+
* @example
|
|
13
|
+
* P.randomInt(1, 10) // => 5
|
|
14
|
+
* P.randomInt(1.5, 2.6) // => 2
|
|
15
|
+
* @dataFirst
|
|
16
|
+
* @category Number
|
|
17
|
+
*/
|
|
18
|
+
declare function randomInteger<From extends number, To extends number>(from: From, to: To): RandomInteger<From, To>;
|
|
19
|
+
|
|
20
|
+
export { randomInteger };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Or, IsNever, NonNegativeInteger, IsEqual, GreaterThan, GreaterThanOrEqual, IntRange } from 'type-fest';
|
|
2
|
+
|
|
3
|
+
type RandomInteger<From extends number, To extends number> = Or<IsNever<NonNegativeInteger<From>>, IsNever<NonNegativeInteger<To>>> extends true ? number : IsEqual<From, To> extends true ? From : GreaterThan<From, To> extends true ? never : GreaterThanOrEqual<To, 1000> extends true ? number : IntRange<From, To> | To;
|
|
4
|
+
/**
|
|
5
|
+
* Generate a random integer between `from` and `to` (inclusive).
|
|
6
|
+
*
|
|
7
|
+
* @param from - The minimum value.
|
|
8
|
+
* @param to - The maximum value.
|
|
9
|
+
* @returns The random integer.
|
|
10
|
+
* @signature
|
|
11
|
+
* P.randomInt(from, to)
|
|
12
|
+
* @example
|
|
13
|
+
* P.randomInt(1, 10) // => 5
|
|
14
|
+
* P.randomInt(1.5, 2.6) // => 2
|
|
15
|
+
* @dataFirst
|
|
16
|
+
* @category Number
|
|
17
|
+
*/
|
|
18
|
+
declare function randomInteger<From extends number, To extends number>(from: From, to: To): RandomInteger<From, To>;
|
|
19
|
+
|
|
20
|
+
export { randomInteger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-QT66COHU.js";export{a as randomInteger};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkIOSBDH5Jcjs = require('./chunk-IOSBDH5J.cjs');test("returns number when from is float",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, .5,1)).toEqualTypeOf()});test("returns number when to is float",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1,1.5)).toEqualTypeOf()});test("returns never when from is greater than to",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 10,1)).toEqualTypeOf()});test("returns the range as union for valid range (0-999)",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 0,5)).toEqualTypeOf(),expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 998,999)).toEqualTypeOf()});test("returns the same value when to equals from",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1,1)).toEqualTypeOf()});test("returns the same value when to equals from and out of range",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1e4,1e4)).toEqualTypeOf()});test("Returns number for large max (to >= 1000)",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1,1001)).toEqualTypeOf()});test("Returns number when from is a negative integer",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, -1,1)).toEqualTypeOf()});test("Returns number when to is a negative integer",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1,-1)).toEqualTypeOf()});test("Returns number when from is a negative decimal",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, -1.5,1)).toEqualTypeOf()});test("Returns number when to is a negative decimal",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1,-1.5)).toEqualTypeOf()});test("Returns number when from is number",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1,5)).toEqualTypeOf()});test("Returns number when to is number",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1,5)).toEqualTypeOf()});test("Returns number when from and to are number",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1,5)).toEqualTypeOf()});test("Returns number when from and to are very big numbers",()=>{expectTypeOf(_chunkIOSBDH5Jcjs.a.call(void 0, 1e10,10000000001)).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-QT66COHU.js";test("returns number when from is float",()=>{expectTypeOf(e(.5,1)).toEqualTypeOf()});test("returns number when to is float",()=>{expectTypeOf(e(1,1.5)).toEqualTypeOf()});test("returns never when from is greater than to",()=>{expectTypeOf(e(10,1)).toEqualTypeOf()});test("returns the range as union for valid range (0-999)",()=>{expectTypeOf(e(0,5)).toEqualTypeOf(),expectTypeOf(e(998,999)).toEqualTypeOf()});test("returns the same value when to equals from",()=>{expectTypeOf(e(1,1)).toEqualTypeOf()});test("returns the same value when to equals from and out of range",()=>{expectTypeOf(e(1e4,1e4)).toEqualTypeOf()});test("Returns number for large max (to >= 1000)",()=>{expectTypeOf(e(1,1001)).toEqualTypeOf()});test("Returns number when from is a negative integer",()=>{expectTypeOf(e(-1,1)).toEqualTypeOf()});test("Returns number when to is a negative integer",()=>{expectTypeOf(e(1,-1)).toEqualTypeOf()});test("Returns number when from is a negative decimal",()=>{expectTypeOf(e(-1.5,1)).toEqualTypeOf()});test("Returns number when to is a negative decimal",()=>{expectTypeOf(e(1,-1.5)).toEqualTypeOf()});test("Returns number when from is number",()=>{expectTypeOf(e(1,5)).toEqualTypeOf()});test("Returns number when to is number",()=>{expectTypeOf(e(1,5)).toEqualTypeOf()});test("Returns number when from and to are number",()=>{expectTypeOf(e(1,5)).toEqualTypeOf()});test("Returns number when from and to are very big numbers",()=>{expectTypeOf(e(1e10,10000000001)).toEqualTypeOf()});
|
package/dist/rank-by.d.cts
CHANGED
package/dist/rank-by.d.ts
CHANGED
package/dist/reverse.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkH7YM6WEOcjs = require('./chunk-H7YM6WEO.cjs');var
|
|
1
|
+
"use strict";var _chunkH7YM6WEOcjs = require('./chunk-H7YM6WEO.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data first",()=>{test("arrays",()=>{let t=_chunkH7YM6WEOcjs.a.call(void 0, [1,2,3]);expectTypeOf(t).toEqualTypeOf()}),test("tuples",()=>{let t=_chunkH7YM6WEOcjs.a.call(void 0, [1,2,[!0],"a"]);expectTypeOf(t).toEqualTypeOf()}),test("variadic tuples",()=>{let r=_chunkH7YM6WEOcjs.a.call(void 0, [1,"two","three"]);expectTypeOf(r).toEqualTypeOf()})});describe("data last",()=>{test("arrays",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1,2,3],_chunkH7YM6WEOcjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()}),test("tuples",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1,2,[!0],"a"],_chunkH7YM6WEOcjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()}),test("variadic tuples",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [1,"two","three"],_chunkH7YM6WEOcjs.a.call(void 0, ));expectTypeOf(r).toEqualTypeOf()})});
|
package/dist/reverse.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-43F3C5SP.js";import{a}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-43F3C5SP.js";import{a}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("arrays",()=>{let t=e([1,2,3]);expectTypeOf(t).toEqualTypeOf()}),test("tuples",()=>{let t=e([1,2,[!0],"a"]);expectTypeOf(t).toEqualTypeOf()}),test("variadic tuples",()=>{let r=e([1,"two","three"]);expectTypeOf(r).toEqualTypeOf()})});describe("data last",()=>{test("arrays",()=>{let t=a([1,2,3],e());expectTypeOf(t).toEqualTypeOf()}),test("tuples",()=>{let t=a([1,2,[!0],"a"],e());expectTypeOf(t).toEqualTypeOf()}),test("variadic tuples",()=>{let r=a([1,"two","three"],e());expectTypeOf(r).toEqualTypeOf()})});
|
package/dist/sample.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IterableContainer } from './types-
|
|
1
|
+
import { I as IterableContainer } from './types-CC8iZVKO.cjs';
|
|
2
2
|
import 'type-fest';
|
|
3
3
|
|
|
4
4
|
type Sampled<T extends IterableContainer, N extends number> = number extends N ? SampledGeneric<T> : undefined extends T[N] ? T : SampledLiteral<T, N>;
|
package/dist/sample.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IterableContainer } from './types-
|
|
1
|
+
import { I as IterableContainer } from './types-CC8iZVKO.js';
|
|
2
2
|
import 'type-fest';
|
|
3
3
|
|
|
4
4
|
type Sampled<T extends IterableContainer, N extends number> = number extends N ? SampledGeneric<T> : undefined extends T[N] ? T : SampledLiteral<T, N>;
|
package/dist/set-path.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkULMOKABQcjs = require('./chunk-ULMOKABQ.cjs');var
|
|
1
|
+
"use strict";var _chunkULMOKABQcjs = require('./chunk-ULMOKABQ.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');var t={a:{b:{c:1},e:[{f:{g:1}},{f:{g:1}}]},y:10};describe("data first",()=>{it("should correctly type value argument",()=>{_chunkULMOKABQcjs.a.call(void 0, t,["a","e",1,"f","g"],"hello"),_chunkULMOKABQcjs.a.call(void 0, t,["a","e",1,"f","g"],123)}),it("should correctly type path argument",()=>{_chunkULMOKABQcjs.a.call(void 0, t,["a","hello"],"hello"),_chunkULMOKABQcjs.a.call(void 0, t,["a","z"],123)}),test("should correctly type partial paths",()=>{_chunkULMOKABQcjs.a.call(void 0, t,["a","b"],123),_chunkULMOKABQcjs.a.call(void 0, t,["a","b"],{c:123})})});describe("data last",()=>{test("should correctly type value argument",()=>{_chunkY7L64OLNcjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","e",1,"f","g"],"hello")),_chunkY7L64OLNcjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","e",1,"f","g"],123))}),test("should correctly type path argument",()=>{_chunkY7L64OLNcjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","hello"],"hello")),_chunkY7L64OLNcjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","z"],123))}),test("should correctly type partial paths",()=>{_chunkY7L64OLNcjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","b"],123)),_chunkY7L64OLNcjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","b"],{c:123}))})});
|
package/dist/set-path.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-QHGCU3LJ.js";import{a}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-QHGCU3LJ.js";import{a}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";var t={a:{b:{c:1},e:[{f:{g:1}},{f:{g:1}}]},y:10};describe("data first",()=>{it("should correctly type value argument",()=>{e(t,["a","e",1,"f","g"],"hello"),e(t,["a","e",1,"f","g"],123)}),it("should correctly type path argument",()=>{e(t,["a","hello"],"hello"),e(t,["a","z"],123)}),test("should correctly type partial paths",()=>{e(t,["a","b"],123),e(t,["a","b"],{c:123})})});describe("data last",()=>{test("should correctly type value argument",()=>{a(t,e(["a","e",1,"f","g"],"hello")),a(t,e(["a","e",1,"f","g"],123))}),test("should correctly type path argument",()=>{a(t,e(["a","hello"],"hello")),a(t,e(["a","z"],123))}),test("should correctly type partial paths",()=>{a(t,e(["a","b"],123)),a(t,e(["a","b"],{c:123}))})});
|
package/dist/set.d.cts
CHANGED
package/dist/set.d.ts
CHANGED
package/dist/shuffle.d.cts
CHANGED
package/dist/shuffle.d.ts
CHANGED
package/dist/shuffle.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunk4WU7JGWScjs = require('./chunk-4WU7JGWS.cjs');var
|
|
1
|
+
"use strict";var _chunk4WU7JGWScjs = require('./chunk-4WU7JGWS.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("regular array",()=>{let e=_chunk4WU7JGWScjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()});test("non-empty tail-rest array",()=>{let e=_chunk4WU7JGWScjs.a.call(void 0, [1]);expectTypeOf(e).toEqualTypeOf()});test("non-empty head-rest array",()=>{let e=_chunk4WU7JGWScjs.a.call(void 0, [1]);expectTypeOf(e).toEqualTypeOf()});test("fixed size tuple",()=>{let e=_chunk4WU7JGWScjs.a.call(void 0, [1,"a",!0]);expectTypeOf(e).toEqualTypeOf()});it("removes readonlyness from array",()=>{let e=_chunk4WU7JGWScjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()});it("infers type via a pipe",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, ["a",1,!0],_chunk4WU7JGWScjs.a.call(void 0, ));expectTypeOf(e).toEqualTypeOf()});
|
package/dist/shuffle.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-PFLGL4YP.js";import{a as t}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-PFLGL4YP.js";import{a as t}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("regular array",()=>{let e=r([]);expectTypeOf(e).toEqualTypeOf()});test("non-empty tail-rest array",()=>{let e=r([1]);expectTypeOf(e).toEqualTypeOf()});test("non-empty head-rest array",()=>{let e=r([1]);expectTypeOf(e).toEqualTypeOf()});test("fixed size tuple",()=>{let e=r([1,"a",!0]);expectTypeOf(e).toEqualTypeOf()});it("removes readonlyness from array",()=>{let e=r([]);expectTypeOf(e).toEqualTypeOf()});it("infers type via a pipe",()=>{let e=t(["a",1,!0],r());expectTypeOf(e).toEqualTypeOf()});
|
package/dist/sort-by.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IterableContainer, a as NonEmptyArray, g as ReorderedArray } from './types-
|
|
1
|
+
import { I as IterableContainer, a as NonEmptyArray, g as ReorderedArray } from './types-CC8iZVKO.cjs';
|
|
2
2
|
import { O as OrderRule } from './curry-order-rules-DETxSzle.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
|
package/dist/sort-by.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IterableContainer, a as NonEmptyArray, g as ReorderedArray } from './types-
|
|
1
|
+
import { I as IterableContainer, a as NonEmptyArray, g as ReorderedArray } from './types-CC8iZVKO.js';
|
|
2
2
|
import { O as OrderRule } from './curry-order-rules-DETxSzle.js';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
|
package/dist/sort-by.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkNIYVDIEQcjs = require('./chunk-NIYVDIEQ.cjs');var
|
|
1
|
+
"use strict";var _chunkNIYVDIEQcjs = require('./chunk-NIYVDIEQ.cjs');var _chunkAQRYBCA3cjs = require('./chunk-AQRYBCA3.cjs');var _chunkSXTSJOEEcjs = require('./chunk-SXTSJOEE.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-FWQYL4Y4.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');var s=[{id:1,color:"red",weight:2,active:!0,date:new Date(2021,1,1)},{id:2,color:"blue",weight:3,active:!1,date:new Date(2021,1,2)},{id:3,color:"green",weight:1,active:!1,date:new Date(2021,1,3)},{id:4,color:"purple",weight:1,active:!0,date:new Date(2021,1,4)}];describe("dataFirst",()=>{test("SortProjection",()=>{let a=_chunkNIYVDIEQcjs.a.call(void 0, [{a:1},{a:3},{a:7},{a:2}],_chunkSXTSJOEEcjs.a.call(void 0, "a"));expectTypeOf(a).toMatchTypeOf()}),test("SortPair",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, s,[a=>a.active,"desc"]);expectTypeOf(e).toEqualTypeOf()})});describe("dataLast",()=>{test("SortProjection",()=>{let a=_chunkY7L64OLNcjs.a.call(void 0, [{a:1},{a:3},{a:7},{a:2}],_chunkNIYVDIEQcjs.a.call(void 0, _chunkSXTSJOEEcjs.a.call(void 0, "a")));expectTypeOf(a).toMatchTypeOf()}),test("SortPair",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, s,_chunkNIYVDIEQcjs.a.call(void 0, [_chunkSXTSJOEEcjs.a.call(void 0, "weight"),"asc"],[_chunkSXTSJOEEcjs.a.call(void 0, "color"),"desc"]));expectTypeOf(e).toEqualTypeOf()})});it("on empty tuple",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});it("on empty readonly tuple",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});it("on array",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});it("on readonly array",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});it("on tuple",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [1,2,3],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});it("on readonly tuple",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [1,2,3],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});it("on tuple with rest tail",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [1],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});it("on readonly tuple with rest tail",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [1],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});test("on tuple with rest middle",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [3,2,1],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});test("on readonly tuple with rest middle",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [3,2,1],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});it("on tuple with rest head",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [1],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});it("on readonly tuple with rest head",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [1],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});test("on tuple with optional values",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, 0));expectTypeOf(e).toEqualTypeOf()});test("on readonly tuple with optional values",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, 0));expectTypeOf(e).toEqualTypeOf()});it("on mixed types tuple",()=>{let e=_chunkNIYVDIEQcjs.a.call(void 0, [1,"hello",!0],_chunkAQRYBCA3cjs.a);expectTypeOf(e).toEqualTypeOf()});
|
package/dist/sort-by.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-J3YPWVVQ.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-J3YPWVVQ.js";import{a as r}from"./chunk-46GBCFAG.js";import{a as n}from"./chunk-USNHLUEU.js";import{a as o}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JXXXUJM5.js";import{a as u}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";var s=[{id:1,color:"red",weight:2,active:!0,date:new Date(2021,1,1)},{id:2,color:"blue",weight:3,active:!1,date:new Date(2021,1,2)},{id:3,color:"green",weight:1,active:!1,date:new Date(2021,1,3)},{id:4,color:"purple",weight:1,active:!0,date:new Date(2021,1,4)}];describe("dataFirst",()=>{test("SortProjection",()=>{let a=t([{a:1},{a:3},{a:7},{a:2}],n("a"));expectTypeOf(a).toMatchTypeOf()}),test("SortPair",()=>{let e=t(s,[a=>a.active,"desc"]);expectTypeOf(e).toEqualTypeOf()})});describe("dataLast",()=>{test("SortProjection",()=>{let a=o([{a:1},{a:3},{a:7},{a:2}],t(n("a")));expectTypeOf(a).toMatchTypeOf()}),test("SortPair",()=>{let e=o(s,t([n("weight"),"asc"],[n("color"),"desc"]));expectTypeOf(e).toEqualTypeOf()})});it("on empty tuple",()=>{let e=t([],r);expectTypeOf(e).toEqualTypeOf()});it("on empty readonly tuple",()=>{let e=t([],r);expectTypeOf(e).toEqualTypeOf()});it("on array",()=>{let e=t([],r);expectTypeOf(e).toEqualTypeOf()});it("on readonly array",()=>{let e=t([],r);expectTypeOf(e).toEqualTypeOf()});it("on tuple",()=>{let e=t([1,2,3],r);expectTypeOf(e).toEqualTypeOf()});it("on readonly tuple",()=>{let e=t([1,2,3],r);expectTypeOf(e).toEqualTypeOf()});it("on tuple with rest tail",()=>{let e=t([1],r);expectTypeOf(e).toEqualTypeOf()});it("on readonly tuple with rest tail",()=>{let e=t([1],r);expectTypeOf(e).toEqualTypeOf()});test("on tuple with rest middle",()=>{let e=t([3,2,1],r);expectTypeOf(e).toEqualTypeOf()});test("on readonly tuple with rest middle",()=>{let e=t([3,2,1],r);expectTypeOf(e).toEqualTypeOf()});it("on tuple with rest head",()=>{let e=t([1],r);expectTypeOf(e).toEqualTypeOf()});it("on readonly tuple with rest head",()=>{let e=t([1],r);expectTypeOf(e).toEqualTypeOf()});test("on tuple with optional values",()=>{let e=t([],u(0));expectTypeOf(e).toEqualTypeOf()});test("on readonly tuple with optional values",()=>{let e=t([],u(0));expectTypeOf(e).toEqualTypeOf()});it("on mixed types tuple",()=>{let e=t([1,"hello",!0],r);expectTypeOf(e).toEqualTypeOf()});
|
package/dist/sort.d.cts
CHANGED
package/dist/sort.d.ts
CHANGED
package/dist/sum.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IterableContainer } from './types-
|
|
1
|
+
import { I as IterableContainer } from './types-CC8iZVKO.cjs';
|
|
2
2
|
import 'type-fest';
|
|
3
3
|
|
|
4
4
|
type Sum<T extends IterableContainer<bigint> | IterableContainer<number>> = T extends readonly [] ? 0 : T extends readonly [bigint, ...ReadonlyArray<unknown>] ? bigint : T[number] extends bigint ? 0 | bigint : number;
|
package/dist/sum.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IterableContainer } from './types-
|
|
1
|
+
import { I as IterableContainer } from './types-CC8iZVKO.js';
|
|
2
2
|
import 'type-fest';
|
|
3
3
|
|
|
4
4
|
type Sum<T extends IterableContainer<bigint> | IterableContainer<number>> = T extends readonly [] ? 0 : T extends readonly [bigint, ...ReadonlyArray<unknown>] ? bigint : T[number] extends bigint ? 0 | bigint : number;
|
package/dist/sum.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunk6TRXWRYJcjs = require('./chunk-6TRXWRYJ.cjs');var
|
|
1
|
+
"use strict";var _chunk6TRXWRYJcjs = require('./chunk-6TRXWRYJ.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("empty arrays",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()});describe("numbers",()=>{test("arbitrary arrays",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, [1,2]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, [1,2,3]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, [1,2]);expectTypeOf(t).toEqualTypeOf()})});describe("bigints",()=>{test("arbitrary arrays",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, [1n,2n]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, [1n,2n,3n]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, [1n,2n]);expectTypeOf(t).toEqualTypeOf()})});describe("dataLast",()=>{test("numbers",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1,2,3],_chunk6TRXWRYJcjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()}),test("bigints",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1n,2n,3n],_chunk6TRXWRYJcjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()})});it("doesn't allow mixed arrays",()=>{_chunk6TRXWRYJcjs.a.call(void 0, [1,2n])});describe("KNOWN ISSUES",()=>{it("Returns 0 (`number`) instead of 0n (`bigint`) for empty `bigint` arrays",()=>{let t=_chunk6TRXWRYJcjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()})});
|
package/dist/sum.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-2T576V7A.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-2T576V7A.js";import{a as r}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("empty arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()});describe("numbers",()=>{test("arbitrary arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=e([1,2]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=e([1,2,3]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=e([1,2]);expectTypeOf(t).toEqualTypeOf()})});describe("bigints",()=>{test("arbitrary arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=e([1n,2n]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=e([1n,2n,3n]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=e([1n,2n]);expectTypeOf(t).toEqualTypeOf()})});describe("dataLast",()=>{test("numbers",()=>{let t=r([1,2,3],e());expectTypeOf(t).toEqualTypeOf()}),test("bigints",()=>{let t=r([1n,2n,3n],e());expectTypeOf(t).toEqualTypeOf()})});it("doesn't allow mixed arrays",()=>{e([1,2n])});describe("KNOWN ISSUES",()=>{it("Returns 0 (`number`) instead of 0n (`bigint`) for empty `bigint` arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()})});
|
package/dist/swap-indices.d.cts
CHANGED
package/dist/swap-indices.d.ts
CHANGED
package/dist/take-first-by.d.cts
CHANGED
package/dist/take-first-by.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkVPG3W5JHcjs = require('./chunk-VPG3W5JH.cjs');var
|
|
1
|
+
"use strict";var _chunkVPG3W5JHcjs = require('./chunk-VPG3W5JH.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data-first",()=>{test("empty array",()=>{let e=_chunkVPG3W5JHcjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=_chunkVPG3W5JHcjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=_chunkVPG3W5JHcjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=_chunkVPG3W5JHcjs.a.call(void 0, [1],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=_chunkVPG3W5JHcjs.a.call(void 0, [1],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=_chunkVPG3W5JHcjs.a.call(void 0, [1,"a"],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=_chunkVPG3W5JHcjs.a.call(void 0, [1,"a",!0],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=_chunkVPG3W5JHcjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkVPG3W5JHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkVPG3W5JHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkVPG3W5JHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkVPG3W5JHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkVPG3W5JHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1,"a"],_chunkVPG3W5JHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1,"a",!0],_chunkVPG3W5JHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkVPG3W5JHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),describe("predicate is typed correctly",()=>{test("empty array",()=>{_chunkY7L64OLNcjs.a.call(void 0, [],_chunkVPG3W5JHcjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("regular array",()=>{_chunkY7L64OLNcjs.a.call(void 0, [],_chunkVPG3W5JHcjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("regular array with union type",()=>{_chunkY7L64OLNcjs.a.call(void 0, [],_chunkVPG3W5JHcjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("prefix array",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkVPG3W5JHcjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("suffix array",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkVPG3W5JHcjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("array with suffix and prefix",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1,"a"],_chunkVPG3W5JHcjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("tuple",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1,"a",!0],_chunkVPG3W5JHcjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("union of arrays",()=>{_chunkY7L64OLNcjs.a.call(void 0, [],_chunkVPG3W5JHcjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-KAA6IVBL.js";import{a as t}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-KAA6IVBL.js";import{a as t}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import{a}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data-first",()=>{test("empty array",()=>{let e=r([],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=r([],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=r([],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=r([1],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=r([1],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=r([1,"a"],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=r([1,"a",!0],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=r([],a(!0));expectTypeOf(e).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let e=t([],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=t([],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=t([],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=t([1],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=t([1],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=t([1,"a"],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=t([1,"a",!0],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=t([],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),describe("predicate is typed correctly",()=>{test("empty array",()=>{t([],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("regular array",()=>{t([],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("regular array with union type",()=>{t([],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("prefix array",()=>{t([1],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("suffix array",()=>{t([1],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("array with suffix and prefix",()=>{t([1,"a"],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("tuple",()=>{t([1,"a",!0],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("union of arrays",()=>{t([],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))})})});
|
package/dist/take-last.d.cts
CHANGED
package/dist/take-last.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunk3DFX2FQGcjs = require('./chunk-3DFX2FQG.cjs');var
|
|
1
|
+
"use strict";var _chunk3DFX2FQGcjs = require('./chunk-3DFX2FQG.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data-first",()=>{test("empty array",()=>{let r=_chunk3DFX2FQGcjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()}),test("regular array",()=>{let r=_chunk3DFX2FQGcjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()}),test("regular array with union type",()=>{let r=_chunk3DFX2FQGcjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()}),test("prefix array",()=>{let r=_chunk3DFX2FQGcjs.a.call(void 0, [1],2);expectTypeOf(r).toEqualTypeOf()}),test("suffix array",()=>{let r=_chunk3DFX2FQGcjs.a.call(void 0, [1],2);expectTypeOf(r).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let r=_chunk3DFX2FQGcjs.a.call(void 0, [1,"a"],2);expectTypeOf(r).toEqualTypeOf()}),test("tuple",()=>{let r=_chunk3DFX2FQGcjs.a.call(void 0, [1,"a",!0],2);expectTypeOf(r).toEqualTypeOf()}),test("union of arrays",()=>{let r=_chunk3DFX2FQGcjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [],_chunk3DFX2FQGcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("regular array",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [],_chunk3DFX2FQGcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("regular array with union type",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [],_chunk3DFX2FQGcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("prefix array",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunk3DFX2FQGcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("suffix array",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunk3DFX2FQGcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [1,"a"],_chunk3DFX2FQGcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("tuple",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [1,"a",!0],_chunk3DFX2FQGcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("union of arrays",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [],_chunk3DFX2FQGcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()})});
|
package/dist/take-last.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-OJ2QGTFS.js";import{a as t}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-OJ2QGTFS.js";import{a as t}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data-first",()=>{test("empty array",()=>{let r=e([],2);expectTypeOf(r).toEqualTypeOf()}),test("regular array",()=>{let r=e([],2);expectTypeOf(r).toEqualTypeOf()}),test("regular array with union type",()=>{let r=e([],2);expectTypeOf(r).toEqualTypeOf()}),test("prefix array",()=>{let r=e([1],2);expectTypeOf(r).toEqualTypeOf()}),test("suffix array",()=>{let r=e([1],2);expectTypeOf(r).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let r=e([1,"a"],2);expectTypeOf(r).toEqualTypeOf()}),test("tuple",()=>{let r=e([1,"a",!0],2);expectTypeOf(r).toEqualTypeOf()}),test("union of arrays",()=>{let r=e([],2);expectTypeOf(r).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let r=t([],e(2));expectTypeOf(r).toEqualTypeOf()}),test("regular array",()=>{let r=t([],e(2));expectTypeOf(r).toEqualTypeOf()}),test("regular array with union type",()=>{let r=t([],e(2));expectTypeOf(r).toEqualTypeOf()}),test("prefix array",()=>{let r=t([1],e(2));expectTypeOf(r).toEqualTypeOf()}),test("suffix array",()=>{let r=t([1],e(2));expectTypeOf(r).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let r=t([1,"a"],e(2));expectTypeOf(r).toEqualTypeOf()}),test("tuple",()=>{let r=t([1,"a",!0],e(2));expectTypeOf(r).toEqualTypeOf()}),test("union of arrays",()=>{let r=t([],e(2));expectTypeOf(r).toEqualTypeOf()})});
|
package/dist/take-while.d.cts
CHANGED
package/dist/take-while.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkZO4ND36Ncjs = require('./chunk-ZO4ND36N.cjs');var
|
|
1
|
+
"use strict";var _chunkZO4ND36Ncjs = require('./chunk-ZO4ND36N.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data-first",()=>{test("empty array",()=>{let e=_chunkZO4ND36Ncjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=_chunkZO4ND36Ncjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=_chunkZO4ND36Ncjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=_chunkZO4ND36Ncjs.a.call(void 0, [1],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=_chunkZO4ND36Ncjs.a.call(void 0, [1],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=_chunkZO4ND36Ncjs.a.call(void 0, [1,"a"],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=_chunkZO4ND36Ncjs.a.call(void 0, [1,"a",!0],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=_chunkZO4ND36Ncjs.a.call(void 0, [],_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkZO4ND36Ncjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkZO4ND36Ncjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkZO4ND36Ncjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkZO4ND36Ncjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkZO4ND36Ncjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1,"a"],_chunkZO4ND36Ncjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1,"a",!0],_chunkZO4ND36Ncjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkZO4ND36Ncjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),describe("predicate is typed correctly",()=>{test("empty array",()=>{_chunkY7L64OLNcjs.a.call(void 0, [],_chunkZO4ND36Ncjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("regular array",()=>{_chunkY7L64OLNcjs.a.call(void 0, [],_chunkZO4ND36Ncjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("regular array with union type",()=>{_chunkY7L64OLNcjs.a.call(void 0, [],_chunkZO4ND36Ncjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("prefix array",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkZO4ND36Ncjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("suffix array",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkZO4ND36Ncjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("array with suffix and prefix",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1,"a"],_chunkZO4ND36Ncjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("tuple",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1,"a",!0],_chunkZO4ND36Ncjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("union of arrays",()=>{_chunkY7L64OLNcjs.a.call(void 0, [],_chunkZO4ND36Ncjs.a.call(void 0, (e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-VN2OAM2N.js";import{a as t}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-VN2OAM2N.js";import{a as t}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import{a}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data-first",()=>{test("empty array",()=>{let e=r([],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=r([],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=r([],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=r([1],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=r([1],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=r([1,"a"],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=r([1,"a",!0],a(!0));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=r([],a(!0));expectTypeOf(e).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let e=t([],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=t([],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=t([],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=t([1],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=t([1],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=t([1,"a"],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=t([1,"a",!0],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=t([],r(a(!0)));expectTypeOf(e).toEqualTypeOf()}),describe("predicate is typed correctly",()=>{test("empty array",()=>{t([],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("regular array",()=>{t([],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("regular array with union type",()=>{t([],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("prefix array",()=>{t([1],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("suffix array",()=>{t([1],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("array with suffix and prefix",()=>{t([1,"a"],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("tuple",()=>{t([1,"a",!0],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))}),test("union of arrays",()=>{t([],r((e,u,y)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(u).toEqualTypeOf(),expectTypeOf(y).toEqualTypeOf(),!0)))})})});
|
package/dist/take.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLBLAWGUHcjs = require('./chunk-LBLAWGUH.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');exports.take = _chunkLBLAWGUHcjs.a;
|
package/dist/take.d.cts
CHANGED
package/dist/take.d.ts
CHANGED
package/dist/take.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-WDT4BJAH.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";export{a as take};
|
package/dist/take.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var _chunkLBLAWGUHcjs = require('./chunk-LBLAWGUH.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data-first",()=>{test("empty array",()=>{let r=_chunkLBLAWGUHcjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()}),test("regular array",()=>{let r=_chunkLBLAWGUHcjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()}),test("regular array with union type",()=>{let r=_chunkLBLAWGUHcjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()}),test("prefix array",()=>{let r=_chunkLBLAWGUHcjs.a.call(void 0, [1],2);expectTypeOf(r).toEqualTypeOf()}),test("suffix array",()=>{let r=_chunkLBLAWGUHcjs.a.call(void 0, [1],2);expectTypeOf(r).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let r=_chunkLBLAWGUHcjs.a.call(void 0, [1,"a"],2);expectTypeOf(r).toEqualTypeOf()}),test("tuple",()=>{let r=_chunkLBLAWGUHcjs.a.call(void 0, [1,"a",!0],2);expectTypeOf(r).toEqualTypeOf()}),test("union of arrays",()=>{let r=_chunkLBLAWGUHcjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkLBLAWGUHcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("regular array",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkLBLAWGUHcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("regular array with union type",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkLBLAWGUHcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("prefix array",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkLBLAWGUHcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("suffix array",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkLBLAWGUHcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [1,"a"],_chunkLBLAWGUHcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("tuple",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [1,"a",!0],_chunkLBLAWGUHcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()}),test("union of arrays",()=>{let r=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkLBLAWGUHcjs.a.call(void 0, 2));expectTypeOf(r).toEqualTypeOf()})});
|
package/dist/take.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-WDT4BJAH.js";import{a as t}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data-first",()=>{test("empty array",()=>{let r=e([],2);expectTypeOf(r).toEqualTypeOf()}),test("regular array",()=>{let r=e([],2);expectTypeOf(r).toEqualTypeOf()}),test("regular array with union type",()=>{let r=e([],2);expectTypeOf(r).toEqualTypeOf()}),test("prefix array",()=>{let r=e([1],2);expectTypeOf(r).toEqualTypeOf()}),test("suffix array",()=>{let r=e([1],2);expectTypeOf(r).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let r=e([1,"a"],2);expectTypeOf(r).toEqualTypeOf()}),test("tuple",()=>{let r=e([1,"a",!0],2);expectTypeOf(r).toEqualTypeOf()}),test("union of arrays",()=>{let r=e([],2);expectTypeOf(r).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let r=t([],e(2));expectTypeOf(r).toEqualTypeOf()}),test("regular array",()=>{let r=t([],e(2));expectTypeOf(r).toEqualTypeOf()}),test("regular array with union type",()=>{let r=t([],e(2));expectTypeOf(r).toEqualTypeOf()}),test("prefix array",()=>{let r=t([1],e(2));expectTypeOf(r).toEqualTypeOf()}),test("suffix array",()=>{let r=t([1],e(2));expectTypeOf(r).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let r=t([1,"a"],e(2));expectTypeOf(r).toEqualTypeOf()}),test("tuple",()=>{let r=t([1,"a",!0],e(2));expectTypeOf(r).toEqualTypeOf()}),test("union of arrays",()=>{let r=t([],e(2));expectTypeOf(r).toEqualTypeOf()})});
|
package/dist/tap.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkYWO7TFODcjs = require('./chunk-YWO7TFOD.cjs');var _chunkKLQZU5J4cjs = require('./chunk-KLQZU5J4.cjs');var _chunkWW7P3TAUcjs = require('./chunk-WW7P3TAU.cjs');var
|
|
1
|
+
"use strict";var _chunkYWO7TFODcjs = require('./chunk-YWO7TFOD.cjs');var _chunkKLQZU5J4cjs = require('./chunk-KLQZU5J4.cjs');var _chunkWW7P3TAUcjs = require('./chunk-WW7P3TAU.cjs');var _chunkC6NFG7IScjs = require('./chunk-C6NFG7IS.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');it("should work in the middle of pipe sequence",()=>{_chunkY7L64OLNcjs.a.call(void 0, [-1,2],_chunkC6NFG7IScjs.a.call(void 0, e=>e>0),_chunkYWO7TFODcjs.a.call(void 0, e=>{expectTypeOf(e).toEqualTypeOf()}),_chunkWW7P3TAUcjs.a.call(void 0, _chunkKLQZU5J4cjs.a.call(void 0, 2)))});it("should infer types after tapping function reference with parameter type any",()=>{_chunkY7L64OLNcjs.a.call(void 0, [-1,2],_chunkC6NFG7IScjs.a.call(void 0, e=>e>0),_chunkYWO7TFODcjs.a.call(void 0, i),_chunkWW7P3TAUcjs.a.call(void 0, e=>(expectTypeOf(e).toEqualTypeOf(),e*2)))});function i(e){return e}
|
package/dist/tap.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-ENIRKKU6.js";import{a as n}from"./chunk-MBYBX5B3.js";import{a as t}from"./chunk-QRDGUNHT.js";import{a as p}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-ENIRKKU6.js";import{a as n}from"./chunk-MBYBX5B3.js";import{a as t}from"./chunk-QRDGUNHT.js";import{a as p}from"./chunk-SOCUEKNU.js";import{a as r}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";it("should work in the middle of pipe sequence",()=>{r([-1,2],p(e=>e>0),o(e=>{expectTypeOf(e).toEqualTypeOf()}),t(n(2)))});it("should infer types after tapping function reference with parameter type any",()=>{r([-1,2],p(e=>e>0),o(i),t(e=>(expectTypeOf(e).toEqualTypeOf(),e*2)))});function i(e){return e}
|