@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
package/dist/is-string.d.ts
CHANGED
package/dist/is-symbol.d.cts
CHANGED
package/dist/is-symbol.d.ts
CHANGED
package/dist/keys.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IterableContainer, b as EnumerableStringKeyOf } from './types-
|
|
1
|
+
import { I as IterableContainer, b as EnumerableStringKeyOf } from './types-CC8iZVKO.cjs';
|
|
2
2
|
import 'type-fest';
|
|
3
3
|
|
|
4
4
|
type Keys<T> = T extends IterableContainer ? ArrayKeys<T> : ObjectKeys<T>;
|
package/dist/keys.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IterableContainer, b as EnumerableStringKeyOf } from './types-
|
|
1
|
+
import { I as IterableContainer, b as EnumerableStringKeyOf } from './types-CC8iZVKO.js';
|
|
2
2
|
import 'type-fest';
|
|
3
3
|
|
|
4
4
|
type Keys<T> = T extends IterableContainer ? ArrayKeys<T> : ObjectKeys<T>;
|
package/dist/keys.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkSNQAZZSYcjs = require('./chunk-SNQAZZSY.cjs');var
|
|
1
|
+
"use strict";var _chunkSNQAZZSYcjs = require('./chunk-SNQAZZSY.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("arrays",()=>{test("empty tuple",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()}),test("empty readonly tuple",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()}),test("array",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()}),test("readonly array",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, ["a",1,!0]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, ["a",1,!0]);expectTypeOf(e).toEqualTypeOf()}),test("tuple with rest tail",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, ["a"]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple with rest tail",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, ["a"]);expectTypeOf(e).toEqualTypeOf()}),test("tuple with rest head",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, ["b"]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple with rest head",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, ["b"]);expectTypeOf(e).toEqualTypeOf()}),test("tuple with rest middle",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, ["a","c"]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple with rest middle",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, ["a","c"]);expectTypeOf(e).toEqualTypeOf()})});describe("object types",()=>{test("empty record (string)",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {});expectTypeOf(e).toEqualTypeOf()}),test("empty record (number)",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {});expectTypeOf(e).toEqualTypeOf()}),test("empty record (const)",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {});expectTypeOf(e).toEqualTypeOf()}),test("unions of records",()=>{let e={},a=_chunkSNQAZZSYcjs.a.call(void 0, e);expectTypeOf(a).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkSNQAZZSYcjs.a.call(void 0, ));expectTypeOf(s).toEqualTypeOf()}),test("simple (required) object",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {a:"a",b:1,c:!0});expectTypeOf(e).toEqualTypeOf()}),test("simple partial object",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {a:"a",b:1,c:!0});expectTypeOf(e).toEqualTypeOf()}),test("object with index signature",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {hello:"world",a:"goodbye"});expectTypeOf(e).toEqualTypeOf()}),test("Record with literal union",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {a:1,b:2});expectTypeOf(e).toEqualTypeOf()}),test("Record with template string literal",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {param_123:"hello",param_456:"world"});expectTypeOf(e).toEqualTypeOf()}),test("object with just symbol keys",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {[Symbol("a")]:1,[Symbol("b")]:"world"});expectTypeOf(e).toEqualTypeOf()}),test("object with number keys",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {123:"HELLO"});expectTypeOf(e).toEqualTypeOf()}),test("object with combined symbols and keys",()=>{let e=_chunkSNQAZZSYcjs.a.call(void 0, {a:1,[Symbol("b")]:"world",123:!0});expectTypeOf(e).toEqualTypeOf()})});
|
package/dist/keys.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-C4EDF27A.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-C4EDF27A.js";import{a as r}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("arrays",()=>{test("empty tuple",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()}),test("empty readonly tuple",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()}),test("array",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()}),test("readonly array",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=t(["a",1,!0]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple",()=>{let e=t(["a",1,!0]);expectTypeOf(e).toEqualTypeOf()}),test("tuple with rest tail",()=>{let e=t(["a"]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple with rest tail",()=>{let e=t(["a"]);expectTypeOf(e).toEqualTypeOf()}),test("tuple with rest head",()=>{let e=t(["b"]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple with rest head",()=>{let e=t(["b"]);expectTypeOf(e).toEqualTypeOf()}),test("tuple with rest middle",()=>{let e=t(["a","c"]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple with rest middle",()=>{let e=t(["a","c"]);expectTypeOf(e).toEqualTypeOf()})});describe("object types",()=>{test("empty record (string)",()=>{let e=t({});expectTypeOf(e).toEqualTypeOf()}),test("empty record (number)",()=>{let e=t({});expectTypeOf(e).toEqualTypeOf()}),test("empty record (const)",()=>{let e=t({});expectTypeOf(e).toEqualTypeOf()}),test("unions of records",()=>{let e={},a=t(e);expectTypeOf(a).toEqualTypeOf();let s=r(e,t());expectTypeOf(s).toEqualTypeOf()}),test("simple (required) object",()=>{let e=t({a:"a",b:1,c:!0});expectTypeOf(e).toEqualTypeOf()}),test("simple partial object",()=>{let e=t({a:"a",b:1,c:!0});expectTypeOf(e).toEqualTypeOf()}),test("object with index signature",()=>{let e=t({hello:"world",a:"goodbye"});expectTypeOf(e).toEqualTypeOf()}),test("Record with literal union",()=>{let e=t({a:1,b:2});expectTypeOf(e).toEqualTypeOf()}),test("Record with template string literal",()=>{let e=t({param_123:"hello",param_456:"world"});expectTypeOf(e).toEqualTypeOf()}),test("object with just symbol keys",()=>{let e=t({[Symbol("a")]:1,[Symbol("b")]:"world"});expectTypeOf(e).toEqualTypeOf()}),test("object with number keys",()=>{let e=t({123:"HELLO"});expectTypeOf(e).toEqualTypeOf()}),test("object with combined symbols and keys",()=>{let e=t({a:1,[Symbol("b")]:"world",123:!0});expectTypeOf(e).toEqualTypeOf()})});
|
package/dist/last.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LastArrayElement } from 'type-fest';
|
|
2
|
-
import { I as IterableContainer } from './types-
|
|
2
|
+
import { I as IterableContainer } from './types-CC8iZVKO.cjs';
|
|
3
3
|
|
|
4
4
|
type Last<T extends IterableContainer> = LastArrayElement<T, T extends readonly [] ? never : undefined>;
|
|
5
5
|
/**
|
package/dist/last.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LastArrayElement } from 'type-fest';
|
|
2
|
-
import { I as IterableContainer } from './types-
|
|
2
|
+
import { I as IterableContainer } from './types-CC8iZVKO.js';
|
|
3
3
|
|
|
4
4
|
type Last<T extends IterableContainer> = LastArrayElement<T, T extends readonly [] ? never : undefined>;
|
|
5
5
|
/**
|
package/dist/last.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkCQQLWV2Acjs = require('./chunk-CQQLWV2A.cjs');var
|
|
1
|
+
"use strict";var _chunkCQQLWV2Acjs = require('./chunk-CQQLWV2A.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');it("works with empty arrays",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()});it("works with regular arrays",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, [1,2,3]);expectTypeOf(e).toEqualTypeOf()});test("works with non-empty arrays",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, [1]);expectTypeOf(e).toEqualTypeOf()});test("should infer type in pipes",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, "this is a text",r=>[...r],_chunkCQQLWV2Acjs.a.call(void 0, ));expectTypeOf(e).toEqualTypeOf()});test("can infer last type from const arrays",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, [3,"a",!1]);expectTypeOf(e).toEqualTypeOf()});test("a bit more complex example",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, [["a",1],!0,{foo:"bar"}]);expectTypeOf(e).toEqualTypeOf()});
|
package/dist/last.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-IYUNRFZS.js";import{a as s}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-IYUNRFZS.js";import{a as s}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";it("works with empty arrays",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()});it("works with regular arrays",()=>{let e=t([1,2,3]);expectTypeOf(e).toEqualTypeOf()});test("works with non-empty arrays",()=>{let e=t([1]);expectTypeOf(e).toEqualTypeOf()});test("should infer type in pipes",()=>{let e=s("this is a text",r=>[...r],t());expectTypeOf(e).toEqualTypeOf()});test("can infer last type from const arrays",()=>{let e=t([3,"a",!1]);expectTypeOf(e).toEqualTypeOf()});test("a bit more complex example",()=>{let e=t([["a",1],!0,{foo:"bar"}]);expectTypeOf(e).toEqualTypeOf()});
|
package/dist/map-keys.d.cts
CHANGED
package/dist/map-keys.d.ts
CHANGED
package/dist/map-keys.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkXXU2FTTAcjs = require('./chunk-XXU2FTTA.cjs');var
|
|
1
|
+
"use strict";var _chunkXXU2FTTAcjs = require('./chunk-XXU2FTTA.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');test("simple string records",()=>{let e=_chunkXXU2FTTAcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, "hello"));expectTypeOf(e).toEqualTypeOf()});test("simple number records",()=>{let e=_chunkXXU2FTTAcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, 123));expectTypeOf(e).toEqualTypeOf()});test("mapping to a string literal",()=>{let e=_chunkXXU2FTTAcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, "cat"));expectTypeOf(e).toEqualTypeOf()});test("symbols are not passed to the mapper",()=>{_chunkXXU2FTTAcjs.a.call(void 0, {[Symbol("mySymbol")]:1,b:"hellO",c:!0},(e,o)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(o).toEqualTypeOf(),3))});test("symbols can be used as the return value",()=>{let e=Symbol("mySymbol"),o=_chunkXXU2FTTAcjs.a.call(void 0, {a:1},_chunkWLNQOMKLcjs.a.call(void 0, e));expectTypeOf(o).toEqualTypeOf()});test("number keys are converted to strings",()=>{_chunkXXU2FTTAcjs.a.call(void 0, {123:"abc",456:"def"},(e,o)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(o).toEqualTypeOf(),e))});test("numbers returned from the mapper are used as-is",()=>{let e=_chunkXXU2FTTAcjs.a.call(void 0, {a:"b"},_chunkWLNQOMKLcjs.a.call(void 0, 123));expectTypeOf(e).toEqualTypeOf()});test("union of records",()=>{let e={},o=_chunkXXU2FTTAcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, "hello"));expectTypeOf(o).toEqualTypeOf();let a=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkXXU2FTTAcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, "hello")));expectTypeOf(a).toEqualTypeOf()});
|
package/dist/map-keys.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-5NG5PDAH.js";import{a as s}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-5NG5PDAH.js";import{a as s}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import{a as r}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("simple string records",()=>{let e=t({},r("hello"));expectTypeOf(e).toEqualTypeOf()});test("simple number records",()=>{let e=t({},r(123));expectTypeOf(e).toEqualTypeOf()});test("mapping to a string literal",()=>{let e=t({},r("cat"));expectTypeOf(e).toEqualTypeOf()});test("symbols are not passed to the mapper",()=>{t({[Symbol("mySymbol")]:1,b:"hellO",c:!0},(e,o)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(o).toEqualTypeOf(),3))});test("symbols can be used as the return value",()=>{let e=Symbol("mySymbol"),o=t({a:1},r(e));expectTypeOf(o).toEqualTypeOf()});test("number keys are converted to strings",()=>{t({123:"abc",456:"def"},(e,o)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(o).toEqualTypeOf(),e))});test("numbers returned from the mapper are used as-is",()=>{let e=t({a:"b"},r(123));expectTypeOf(e).toEqualTypeOf()});test("union of records",()=>{let e={},o=t(e,r("hello"));expectTypeOf(o).toEqualTypeOf();let a=s(e,t(r("hello")));expectTypeOf(a).toEqualTypeOf()});
|
package/dist/map-values.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Simplify } from 'type-fest';
|
|
2
|
-
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf } from './types-
|
|
2
|
+
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf } from './types-CC8iZVKO.cjs';
|
|
3
3
|
|
|
4
4
|
type MappedValues<T extends object, Value> = Simplify<{
|
|
5
5
|
-readonly [P in keyof T as `${P extends number | string ? P : never}`]: Value;
|
package/dist/map-values.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Simplify } from 'type-fest';
|
|
2
|
-
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf } from './types-
|
|
2
|
+
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf } from './types-CC8iZVKO.js';
|
|
3
3
|
|
|
4
4
|
type MappedValues<T extends object, Value> = Simplify<{
|
|
5
5
|
-readonly [P in keyof T as `${P extends number | string ? P : never}`]: Value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkGNEUT34Mcjs = require('./chunk-GNEUT34M.cjs');var
|
|
1
|
+
"use strict";var _chunkGNEUT34Mcjs = require('./chunk-GNEUT34M.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("interface",()=>{test("should set the type of the key to be the union of the keys of the object",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>expectTypeOf(e).toEqualTypeOf())}),test("should exclude symbols from keys",()=>{let t=Symbol("mySymbol");_chunkGNEUT34Mcjs.a.call(void 0, {},(e,n)=>expectTypeOf(n).toEqualTypeOf())})});describe("mapped type",()=>{test("should work with string keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with number keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with template literal string keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should not work with symbol keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})})});describe("indexed signature",()=>{test("should work with string keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with number keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with template literal string keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should not work with symbol keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})})});describe("branded types",()=>{test("should infer types correctly in the mapper",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {U1:1,U2:2},(e,n)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(n).toEqualTypeOf()})})});test("symbols are filtered out",()=>{let t=Symbol("mySymbol"),e=_chunkGNEUT34Mcjs.a.call(void 0, {[t]:1,a:"hello"},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()});test("symbols are ignored by the mapper",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {[Symbol("a")]:"hello",b:1,c:!0},(t,e)=>{expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()})});test("objects with just symbol keys are still well defined",()=>{let t=_chunkGNEUT34Mcjs.a.call(void 0, {[Symbol("a")]:1},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(t).toEqualTypeOf()});test("number keys are converted to string in the mapper",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {123:456},(t,e)=>(expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf(),"world"))});test("maintains partiality",()=>{let t=_chunkGNEUT34Mcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(t).toEqualTypeOf()});test("unions of records",()=>{let t={},e=_chunkGNEUT34Mcjs.a.call(void 0, t,_chunkWLNQOMKLcjs.a.call(void 0, "hello"));expectTypeOf(e).toEqualTypeOf();let n=_chunkY7L64OLNcjs.a.call(void 0, t,_chunkGNEUT34Mcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, "hello")));expectTypeOf(n).toEqualTypeOf()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-ZA4IP5S7.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-ZA4IP5S7.js";import{a as r}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import{a as s}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("interface",()=>{test("should set the type of the key to be the union of the keys of the object",()=>{o({},(t,e)=>expectTypeOf(e).toEqualTypeOf())}),test("should exclude symbols from keys",()=>{let t=Symbol("mySymbol");o({},(e,n)=>expectTypeOf(n).toEqualTypeOf())})});describe("mapped type",()=>{test("should work with string keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with number keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with template literal string keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should not work with symbol keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})})});describe("indexed signature",()=>{test("should work with string keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with number keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with template literal string keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should not work with symbol keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})})});describe("branded types",()=>{test("should infer types correctly in the mapper",()=>{o({U1:1,U2:2},(e,n)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(n).toEqualTypeOf()})})});test("symbols are filtered out",()=>{let t=Symbol("mySymbol"),e=o({[t]:1,a:"hello"},s(!0));expectTypeOf(e).toEqualTypeOf()});test("symbols are ignored by the mapper",()=>{o({[Symbol("a")]:"hello",b:1,c:!0},(t,e)=>{expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()})});test("objects with just symbol keys are still well defined",()=>{let t=o({[Symbol("a")]:1},s(!0));expectTypeOf(t).toEqualTypeOf()});test("number keys are converted to string in the mapper",()=>{o({123:456},(t,e)=>(expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf(),"world"))});test("maintains partiality",()=>{let t=o({},s(!0));expectTypeOf(t).toEqualTypeOf()});test("unions of records",()=>{let t={},e=o(t,s("hello"));expectTypeOf(e).toEqualTypeOf();let n=r(t,o(s("hello")));expectTypeOf(n).toEqualTypeOf()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkD774SJZIcjs = require('./chunk-D774SJZI.cjs');require('./chunk-SU7H3HVP.cjs');require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');exports.mapWithFeedback = _chunkD774SJZIcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-Y7ACNJIO.js";import"./chunk-SS3ILCPB.js";import"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";export{a as mapWithFeedback};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var _chunkD774SJZIcjs = require('./chunk-D774SJZI.cjs');require('./chunk-SU7H3HVP.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');it("should return a mutable tuple type whose length matches input container's length, consisting of the type of the initial value",()=>{let e=_chunkD774SJZIcjs.a.call(void 0, [1,2,3,4,5],(t,n)=>t+n,100);expectTypeOf(e).toEqualTypeOf()});it("should return a tuple consisting of the initial value type even if the initial iterable contains a different type",()=>{let e=_chunkD774SJZIcjs.a.call(void 0, ["1","2","3","4","5"],(t,n)=>t+Number.parseInt(n,10),100);expectTypeOf(e).toEqualTypeOf()});it("should correctly infer type with a non-literal array type",()=>{let e=_chunkD774SJZIcjs.a.call(void 0, [1,2,3,4,5],(t,n)=>t+n,100);expectTypeOf(e).toEqualTypeOf()});it("should return a tuple consisting of the initial value type even if the initial iterable contains a different type",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1,2,3,4,5],_chunkD774SJZIcjs.a.call(void 0, (t,n)=>t+n,100));expectTypeOf(e).toEqualTypeOf()});it("the items array passed to the callback should be an array type containing the union type of all of the members in the original array",()=>{_chunkD774SJZIcjs.a.call(void 0, [1,2,3,4,5],(e,t,n,i)=>(expectTypeOf(i).toEqualTypeOf(),e+t),100)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-Y7ACNJIO.js";import"./chunk-SS3ILCPB.js";import{a}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";it("should return a mutable tuple type whose length matches input container's length, consisting of the type of the initial value",()=>{let e=r([1,2,3,4,5],(t,n)=>t+n,100);expectTypeOf(e).toEqualTypeOf()});it("should return a tuple consisting of the initial value type even if the initial iterable contains a different type",()=>{let e=r(["1","2","3","4","5"],(t,n)=>t+Number.parseInt(n,10),100);expectTypeOf(e).toEqualTypeOf()});it("should correctly infer type with a non-literal array type",()=>{let e=r([1,2,3,4,5],(t,n)=>t+n,100);expectTypeOf(e).toEqualTypeOf()});it("should return a tuple consisting of the initial value type even if the initial iterable contains a different type",()=>{let e=a([1,2,3,4,5],r((t,n)=>t+n,100));expectTypeOf(e).toEqualTypeOf()});it("the items array passed to the callback should be an array type containing the union type of all of the members in the original array",()=>{r([1,2,3,4,5],(e,t,n,i)=>(expectTypeOf(i).toEqualTypeOf(),e+t),100)});
|
package/dist/map.d.cts
CHANGED
package/dist/map.d.ts
CHANGED
package/dist/nth-by.d.cts
CHANGED
package/dist/nth-by.d.ts
CHANGED
package/dist/nth-by.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunk5UP2X3VYcjs = require('./chunk-5UP2X3VY.cjs');var
|
|
1
|
+
"use strict";var _chunk5UP2X3VYcjs = require('./chunk-5UP2X3VY.cjs');var _chunkAQRYBCA3cjs = require('./chunk-AQRYBCA3.cjs');require('./chunk-5KO77UXQ.cjs');require('./chunk-FWQYL4Y4.cjs');it("works with regular arrays",()=>{let e=_chunk5UP2X3VYcjs.a.call(void 0, [1,2,3],0,_chunkAQRYBCA3cjs.a.call(void 0, ));expectTypeOf(e).toEqualTypeOf()});it("works with negative indices",()=>{let e=_chunk5UP2X3VYcjs.a.call(void 0, [1,2,3],-1,_chunkAQRYBCA3cjs.a.call(void 0, ));expectTypeOf(e).toEqualTypeOf()});it("works with tuples",()=>{let r=_chunk5UP2X3VYcjs.a.call(void 0, ["a",!0,1],1,_chunkAQRYBCA3cjs.a.call(void 0, ));expectTypeOf(r).toEqualTypeOf()});
|
package/dist/nth-by.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-3DPIEAUX.js";import{a as t}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-3DPIEAUX.js";import{a as t}from"./chunk-46GBCFAG.js";import"./chunk-UYH64IBH.js";import"./chunk-JXXXUJM5.js";it("works with regular arrays",()=>{let e=n([1,2,3],0,t());expectTypeOf(e).toEqualTypeOf()});it("works with negative indices",()=>{let e=n([1,2,3],-1,t());expectTypeOf(e).toEqualTypeOf()});it("works with tuples",()=>{let r=n(["a",!0,1],1,t());expectTypeOf(r).toEqualTypeOf()});
|
package/dist/omit-by.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Simplify, IfNever } from 'type-fest';
|
|
2
|
-
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf, f as IfBoundedRecord, R as ReconstructedRecord } from './types-
|
|
2
|
+
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf, f as IfBoundedRecord, R as ReconstructedRecord } from './types-CC8iZVKO.cjs';
|
|
3
3
|
|
|
4
4
|
type PickSymbolKeys<T extends object> = {
|
|
5
5
|
-readonly [P in keyof T as P extends symbol ? P : never]: T[P];
|
package/dist/omit-by.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Simplify, IfNever } from 'type-fest';
|
|
2
|
-
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf, f as IfBoundedRecord, R as ReconstructedRecord } from './types-
|
|
2
|
+
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf, f as IfBoundedRecord, R as ReconstructedRecord } from './types-CC8iZVKO.js';
|
|
3
3
|
|
|
4
4
|
type PickSymbolKeys<T extends object> = {
|
|
5
5
|
-readonly [P in keyof T as P extends symbol ? P : never]: T[P];
|
package/dist/omit-by.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkCIZWCFSYcjs = require('./chunk-CIZWCFSY.cjs');var _chunkD32D4HMPcjs = require('./chunk-D32D4HMP.cjs');var _chunkXUEOOIR6cjs = require('./chunk-XUEOOIR6.cjs');var _chunkEHJK4JRFcjs = require('./chunk-EHJK4JRF.cjs');var
|
|
1
|
+
"use strict";var _chunkCIZWCFSYcjs = require('./chunk-CIZWCFSY.cjs');var _chunkD32D4HMPcjs = require('./chunk-D32D4HMP.cjs');var _chunkXUEOOIR6cjs = require('./chunk-XUEOOIR6.cjs');var _chunkEHJK4JRFcjs = require('./chunk-EHJK4JRF.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("it should omit props",()=>{let e=_chunkCIZWCFSYcjs.a.call(void 0, {a:1,b:2,A:3,B:4},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let e=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()})});describe("data last",()=>{test("it should omit props",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {a:1,b:2,A:3,B:4},_chunkCIZWCFSYcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {},_chunkCIZWCFSYcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()})});test("symbols are passed through",()=>{let e=Symbol("required"),n=Symbol("optional"),s=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(s).toEqualTypeOf()});test("symbols are not passed to the predicate",()=>{_chunkCIZWCFSYcjs.a.call(void 0, {[Symbol("mySymbol")]:1,b:"hello",c:!0},(e,n)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(n).toEqualTypeOf(),!0))});test("number keys are passed as strings to the predicate",()=>{_chunkCIZWCFSYcjs.a.call(void 0, {123:"hello"},(e,n)=>(expectTypeOf(n).toEqualTypeOf(),!0))});test("handles type-predicates",()=>{let e=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkEHJK4JRFcjs.a);expectTypeOf(e).toEqualTypeOf()});test("Makes wide types partial",()=>{let e=_chunkCIZWCFSYcjs.a.call(void 0, {a:0},_chunkD32D4HMPcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf();let n=_chunkCIZWCFSYcjs.a.call(void 0, {a:1},s=>!0);expectTypeOf(n).toEqualTypeOf()});test("Works well with nullish type-guards",()=>{let e={},n=_chunkCIZWCFSYcjs.a.call(void 0, e,p);expectTypeOf(n).toEqualTypeOf();let s=_chunkCIZWCFSYcjs.a.call(void 0, e,d);expectTypeOf(s).toEqualTypeOf();let u=_chunkCIZWCFSYcjs.a.call(void 0, e,_chunkXUEOOIR6cjs.a);expectTypeOf(u).toEqualTypeOf()});describe("Records with non-narrowing predicates (Issue #696)",()=>{test("string keys",()=>{let e={},n=_chunkCIZWCFSYcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(n).toEqualTypeOf(e)}),test("number keys",()=>{let n=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(n).toEqualTypeOf()}),test("combined numbers and strings",()=>{let n=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(n).toEqualTypeOf()}),test("union of records",()=>{let e={},n=_chunkCIZWCFSYcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(n).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkCIZWCFSYcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(s).toEqualTypeOf()})});function p(e){return e===void 0}function d(e){return typeof e=="object"&&e===null}
|
package/dist/omit-by.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-ZIF7K2PC.js";import{a}from"./chunk-YTNT635N.js";import{a as l}from"./chunk-TBXEXWSK.js";import{a as o}from"./chunk-UYLVIAK4.js";import{a as i}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-ZIF7K2PC.js";import{a}from"./chunk-YTNT635N.js";import{a as l}from"./chunk-TBXEXWSK.js";import{a as o}from"./chunk-UYLVIAK4.js";import{a as i}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import{a as r}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("it should omit props",()=>{let e=t({a:1,b:2,A:3,B:4},r(!0));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let e=t({},r(!0));expectTypeOf(e).toEqualTypeOf()})});describe("data last",()=>{test("it should omit props",()=>{let e=i({a:1,b:2,A:3,B:4},t(r(!0)));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let e=i({},t(r(!0)));expectTypeOf(e).toEqualTypeOf()})});test("symbols are passed through",()=>{let e=Symbol("required"),n=Symbol("optional"),s=t({},r(!0));expectTypeOf(s).toEqualTypeOf()});test("symbols are not passed to the predicate",()=>{t({[Symbol("mySymbol")]:1,b:"hello",c:!0},(e,n)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(n).toEqualTypeOf(),!0))});test("number keys are passed as strings to the predicate",()=>{t({123:"hello"},(e,n)=>(expectTypeOf(n).toEqualTypeOf(),!0))});test("handles type-predicates",()=>{let e=t({},o);expectTypeOf(e).toEqualTypeOf()});test("Makes wide types partial",()=>{let e=t({a:0},a(1));expectTypeOf(e).toEqualTypeOf();let n=t({a:1},s=>!0);expectTypeOf(n).toEqualTypeOf()});test("Works well with nullish type-guards",()=>{let e={},n=t(e,p);expectTypeOf(n).toEqualTypeOf();let s=t(e,d);expectTypeOf(s).toEqualTypeOf();let u=t(e,l);expectTypeOf(u).toEqualTypeOf()});describe("Records with non-narrowing predicates (Issue #696)",()=>{test("string keys",()=>{let e={},n=t(e,r(!0));expectTypeOf(n).toEqualTypeOf(e)}),test("number keys",()=>{let n=t({},r(!0));expectTypeOf(n).toEqualTypeOf()}),test("combined numbers and strings",()=>{let n=t({},r(!0));expectTypeOf(n).toEqualTypeOf()}),test("union of records",()=>{let e={},n=t(e,r(!0));expectTypeOf(n).toEqualTypeOf();let s=i(e,t(r(!0)));expectTypeOf(s).toEqualTypeOf()})});function p(e){return e===void 0}function d(e){return typeof e=="object"&&e===null}
|
package/dist/omit.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkINAPFYB2cjs = require('./chunk-INAPFYB2.cjs');var
|
|
1
|
+
"use strict";var _chunkINAPFYB2cjs = require('./chunk-INAPFYB2.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-G66EZBJS.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data first",()=>{test("non existing prop",()=>{_chunkINAPFYB2cjs.a.call(void 0, {a:1,b:2,c:3,d:4},["not","in"])}),test("complex type",()=>{let e=_chunkINAPFYB2cjs.a.call(void 0, {a:1},["a"]);expectTypeOf(e).toEqualTypeOf()})});describe("data last",()=>{test("non existing prop",()=>{_chunkY7L64OLNcjs.a.call(void 0, {a:1,b:2,c:3,d:4},_chunkINAPFYB2cjs.a.call(void 0, ["not","in"]))}),test("complex type",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {a:1},_chunkINAPFYB2cjs.a.call(void 0, ["a"]));expectTypeOf(e).toEqualTypeOf()})});test("multiple keys",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {aProp:"p1",bProp:"p2"},_chunkINAPFYB2cjs.a.call(void 0, ["aProp","bProp"]));expectTypeOf(e).toEqualTypeOf()});
|
package/dist/omit.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-KTMLSQQ7.js";import{a}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-KTMLSQQ7.js";import{a}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-73BYESBE.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("non existing prop",()=>{t({a:1,b:2,c:3,d:4},["not","in"])}),test("complex type",()=>{let e=t({a:1},["a"]);expectTypeOf(e).toEqualTypeOf()})});describe("data last",()=>{test("non existing prop",()=>{a({a:1,b:2,c:3,d:4},t(["not","in"]))}),test("complex type",()=>{let e=a({a:1},t(["a"]));expectTypeOf(e).toEqualTypeOf()})});test("multiple keys",()=>{let e=a({aProp:"p1",bProp:"p2"},t(["aProp","bProp"]));expectTypeOf(e).toEqualTypeOf()});
|
package/dist/only.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 Only<T extends IterableContainer> = T extends readonly [...Array<unknown>, unknown, unknown] | readonly [] | readonly [unknown, ...Array<unknown>, unknown] | readonly [unknown, unknown, ...Array<unknown>] ? undefined : T extends readonly [unknown] ? T[number] : T[number] | undefined;
|
package/dist/only.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 Only<T extends IterableContainer> = T extends readonly [...Array<unknown>, unknown, unknown] | readonly [] | readonly [unknown, ...Array<unknown>, unknown] | readonly [unknown, unknown, ...Array<unknown>] ? undefined : T extends readonly [unknown] ? T[number] : T[number] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkTA5NVANUcjs = require('./chunk-TA5NVANU.cjs');var _chunkYWTY4X2Rcjs = require('./chunk-YWTY4X2R.cjs');var
|
|
1
|
+
"use strict";var _chunkTA5NVANUcjs = require('./chunk-TA5NVANU.cjs');var _chunkYWTY4X2Rcjs = require('./chunk-YWTY4X2R.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("partition with type guard",()=>{let t=_chunkTA5NVANUcjs.a.call(void 0, [1,"a",2,"b"],_chunkYWTY4X2Rcjs.a);expectTypeOf(t).toEqualTypeOf()});test("partition with type guard in pipe",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1,"a",2,"b"],_chunkTA5NVANUcjs.a.call(void 0, a=>typeof a=="number"));expectTypeOf(t).toEqualTypeOf()});
|
package/dist/partition.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-PL6B6X5G.js";import{a as e}from"./chunk-Q2HW4RVT.js";import{a as p}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-PL6B6X5G.js";import{a as e}from"./chunk-Q2HW4RVT.js";import{a as p}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("partition with type guard",()=>{let t=r([1,"a",2,"b"],e);expectTypeOf(t).toEqualTypeOf()});test("partition with type guard in pipe",()=>{let t=p([1,"a",2,"b"],r(a=>typeof a=="number"));expectTypeOf(t).toEqualTypeOf()});
|
package/dist/pick-by.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Simplify, IfNever } from 'type-fest';
|
|
2
|
-
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf, f as IfBoundedRecord, R as ReconstructedRecord } from './types-
|
|
2
|
+
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf, f as IfBoundedRecord, R as ReconstructedRecord } from './types-CC8iZVKO.cjs';
|
|
3
3
|
|
|
4
4
|
type EnumerableKey<T> = `${T extends number | string ? T : never}`;
|
|
5
5
|
type EnumeratedPartial<T> = T extends unknown ? Simplify<IfBoundedRecord<T, {
|
package/dist/pick-by.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Simplify, IfNever } from 'type-fest';
|
|
2
|
-
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf, f as IfBoundedRecord, R as ReconstructedRecord } from './types-
|
|
2
|
+
import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf, f as IfBoundedRecord, R as ReconstructedRecord } from './types-CC8iZVKO.js';
|
|
3
3
|
|
|
4
4
|
type EnumerableKey<T> = `${T extends number | string ? T : never}`;
|
|
5
5
|
type EnumeratedPartial<T> = T extends unknown ? Simplify<IfBoundedRecord<T, {
|
package/dist/pick-by.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkGXVKH5OXcjs = require('./chunk-GXVKH5OX.cjs');var _chunk7XMQFPW7cjs = require('./chunk-7XMQFPW7.cjs');var _chunkYSTUBBOJcjs = require('./chunk-YSTUBBOJ.cjs');var _chunkD32D4HMPcjs = require('./chunk-D32D4HMP.cjs');var _chunkDAFN5EJRcjs = require('./chunk-DAFN5EJR.cjs');var _chunkEHJK4JRFcjs = require('./chunk-EHJK4JRF.cjs');var
|
|
1
|
+
"use strict";var _chunkGXVKH5OXcjs = require('./chunk-GXVKH5OX.cjs');var _chunk7XMQFPW7cjs = require('./chunk-7XMQFPW7.cjs');var _chunkYSTUBBOJcjs = require('./chunk-YSTUBBOJ.cjs');var _chunkD32D4HMPcjs = require('./chunk-D32D4HMP.cjs');var _chunkDAFN5EJRcjs = require('./chunk-DAFN5EJR.cjs');var _chunkEHJK4JRFcjs = require('./chunk-EHJK4JRF.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("it should pick props",()=>{let e=_chunkGXVKH5OXcjs.a.call(void 0, {a:1,b:2,A:3,B:4},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let t=_chunkGXVKH5OXcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(t).toEqualTypeOf()})});describe("data last",()=>{test("it should pick props",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {a:1,b:2,A:3,B:4},_chunkGXVKH5OXcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, {},_chunkGXVKH5OXcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(t).toEqualTypeOf()})});test("symbols are filtered out",()=>{let t=Symbol("mySymbol"),e=_chunkGXVKH5OXcjs.a.call(void 0, {[t]:1,a:123},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()});test("symbols are not passed to the predicate",()=>{_chunkGXVKH5OXcjs.a.call(void 0, {[Symbol("mySymbol")]:1,b:"hello",c:!0},(t,e)=>(expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf(),!0))});test("Makes wide types partial",()=>{let t=_chunkGXVKH5OXcjs.a.call(void 0, {a:0},_chunkD32D4HMPcjs.a.call(void 0, 1));expectTypeOf(t).toEqualTypeOf();let e=_chunkGXVKH5OXcjs.a.call(void 0, {a:1},s=>!0);expectTypeOf(e).toEqualTypeOf()});test("works with type-guards",()=>{let t=Symbol("test"),e=_chunkGXVKH5OXcjs.a.call(void 0, {},_chunkEHJK4JRFcjs.a);expectTypeOf(e).toEqualTypeOf()});test("Works well with nullish type-guards",()=>{let t={},e=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunkYSTUBBOJcjs.a);expectTypeOf(e).toEqualTypeOf();let s=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunk7XMQFPW7cjs.a);expectTypeOf(s).toEqualTypeOf();let d=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunkDAFN5EJRcjs.a);expectTypeOf(d).toEqualTypeOf()});describe("Records with non-narrowing predicates (Issue #696)",()=>{test("string keys",()=>{let t={},e=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf(t)}),test("number keys",()=>{let e=_chunkGXVKH5OXcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("combined numbers and strings",()=>{let e=_chunkGXVKH5OXcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("union of records",()=>{let t={},e=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, t,_chunkGXVKH5OXcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(s).toEqualTypeOf()})});
|
package/dist/pick-by.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-LWPEZ7RI.js";import{a as p}from"./chunk-6BKLAQWR.js";import{a as u}from"./chunk-DNSXSQCO.js";import{a as o}from"./chunk-YTNT635N.js";import{a}from"./chunk-QPP664N4.js";import{a as l}from"./chunk-UYLVIAK4.js";import{a as i}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-LWPEZ7RI.js";import{a as p}from"./chunk-6BKLAQWR.js";import{a as u}from"./chunk-DNSXSQCO.js";import{a as o}from"./chunk-YTNT635N.js";import{a}from"./chunk-QPP664N4.js";import{a as l}from"./chunk-UYLVIAK4.js";import{a as i}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import{a as r}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("it should pick props",()=>{let e=n({a:1,b:2,A:3,B:4},r(!0));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let t=n({},r(!0));expectTypeOf(t).toEqualTypeOf()})});describe("data last",()=>{test("it should pick props",()=>{let e=i({a:1,b:2,A:3,B:4},n(r(!0)));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let t=i({},n(r(!0)));expectTypeOf(t).toEqualTypeOf()})});test("symbols are filtered out",()=>{let t=Symbol("mySymbol"),e=n({[t]:1,a:123},r(!0));expectTypeOf(e).toEqualTypeOf()});test("symbols are not passed to the predicate",()=>{n({[Symbol("mySymbol")]:1,b:"hello",c:!0},(t,e)=>(expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf(),!0))});test("Makes wide types partial",()=>{let t=n({a:0},o(1));expectTypeOf(t).toEqualTypeOf();let e=n({a:1},s=>!0);expectTypeOf(e).toEqualTypeOf()});test("works with type-guards",()=>{let t=Symbol("test"),e=n({},l);expectTypeOf(e).toEqualTypeOf()});test("Works well with nullish type-guards",()=>{let t={},e=n(t,u);expectTypeOf(e).toEqualTypeOf();let s=n(t,p);expectTypeOf(s).toEqualTypeOf();let d=n(t,a);expectTypeOf(d).toEqualTypeOf()});describe("Records with non-narrowing predicates (Issue #696)",()=>{test("string keys",()=>{let t={},e=n(t,r(!0));expectTypeOf(e).toEqualTypeOf(t)}),test("number keys",()=>{let e=n({},r(!0));expectTypeOf(e).toEqualTypeOf()}),test("combined numbers and strings",()=>{let e=n({},r(!0));expectTypeOf(e).toEqualTypeOf()}),test("union of records",()=>{let t={},e=n(t,r(!0));expectTypeOf(e).toEqualTypeOf();let s=i(t,n(r(!0)));expectTypeOf(s).toEqualTypeOf()})});
|
package/dist/pick.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkE6MBOCICcjs = require('./chunk-E6MBOCIC.cjs');var
|
|
1
|
+
"use strict";var _chunkE6MBOCICcjs = require('./chunk-E6MBOCIC.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data first",()=>{test("non existing prop",()=>{_chunkE6MBOCICcjs.a.call(void 0, {a:1,b:2,c:3,d:4},["not","in"])}),test("complex type",()=>{let t=_chunkE6MBOCICcjs.a.call(void 0, {a:1},["a"]);expectTypeOf(t).toEqualTypeOf()})});describe("data last",()=>{test("non existing prop",()=>{_chunkY7L64OLNcjs.a.call(void 0, {a:1,b:2,c:3,d:4},_chunkE6MBOCICcjs.a.call(void 0, ["not","in"]))}),test("complex type",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, {a:1},_chunkE6MBOCICcjs.a.call(void 0, ["a"]));expectTypeOf(t).toEqualTypeOf()})});test("multiple keys",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, {aProp:"p1",bProp:"p2"},_chunkE6MBOCICcjs.a.call(void 0, ["aProp","bProp"]));expectTypeOf(t).toEqualTypeOf()});test("support inherited properties",()=>{class s{testProp(){return"abc"}}class t extends s{}let a=new t;expectTypeOf(_chunkE6MBOCICcjs.a.call(void 0, a,["testProp"])).toEqualTypeOf()});
|
package/dist/pick.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-ZUNMUNQT.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-ZUNMUNQT.js";import{a as r}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("non existing prop",()=>{e({a:1,b:2,c:3,d:4},["not","in"])}),test("complex type",()=>{let t=e({a:1},["a"]);expectTypeOf(t).toEqualTypeOf()})});describe("data last",()=>{test("non existing prop",()=>{r({a:1,b:2,c:3,d:4},e(["not","in"]))}),test("complex type",()=>{let t=r({a:1},e(["a"]));expectTypeOf(t).toEqualTypeOf()})});test("multiple keys",()=>{let t=r({aProp:"p1",bProp:"p2"},e(["aProp","bProp"]));expectTypeOf(t).toEqualTypeOf()});test("support inherited properties",()=>{class s{testProp(){return"abc"}}class t extends s{}let a=new t;expectTypeOf(e(a,["testProp"])).toEqualTypeOf()});
|
package/dist/pipe.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');exports.pipe = _chunkY7L64OLNcjs.a;
|
package/dist/pipe.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";export{a as pipe};
|
package/dist/piped.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCRWFVSUPcjs = require('./chunk-CRWFVSUP.cjs');require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');exports.piped = _chunkCRWFVSUPcjs.a;
|
package/dist/piped.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-Y5OLUMVB.js";import"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";export{a as piped};
|
package/dist/product.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 Product<T extends IterableContainer<bigint> | IterableContainer<number>> = T extends readonly [] ? 1 : T extends readonly [bigint, ...ReadonlyArray<unknown>] ? bigint : T[number] extends bigint ? 1 | bigint : number;
|
package/dist/product.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 Product<T extends IterableContainer<bigint> | IterableContainer<number>> = T extends readonly [] ? 1 : T extends readonly [bigint, ...ReadonlyArray<unknown>] ? bigint : T[number] extends bigint ? 1 | bigint : number;
|
package/dist/product.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkTKJ7YEHScjs = require('./chunk-TKJ7YEHS.cjs');var
|
|
1
|
+
"use strict";var _chunkTKJ7YEHScjs = require('./chunk-TKJ7YEHS.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("empty arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()});describe("numbers",()=>{test("arbitrary arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1,2]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1,2,3]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1,2]);expectTypeOf(t).toEqualTypeOf()})});describe("bigints",()=>{test("arbitrary arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1n,2n]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1n,2n,3n]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1n,2n]);expectTypeOf(t).toEqualTypeOf()})});describe("dataLast",()=>{test("numbers",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1,2,3],_chunkTKJ7YEHScjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()}),test("bigints",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1n,2n,3n],_chunkTKJ7YEHScjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()})});it("doesn't allow mixed arrays",()=>{_chunkTKJ7YEHScjs.a.call(void 0, [1,2n])});describe("KNOWN ISSUES",()=>{it("Returns 1 (`number`) instead of 1n (`bigint`) for empty `bigint` arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()})});
|
package/dist/product.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-KG2TAX4E.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-KG2TAX4E.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 1 (`number`) instead of 1n (`bigint`) for empty `bigint` arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()})});
|
package/dist/prop.spec-d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkNIYVDIEQcjs = require('./chunk-NIYVDIEQ.cjs');var _chunkSXTSJOEEcjs = require('./chunk-SXTSJOEE.cjs');var
|
|
1
|
+
"use strict";var _chunkNIYVDIEQcjs = require('./chunk-NIYVDIEQ.cjs');var _chunkSXTSJOEEcjs = require('./chunk-SXTSJOEE.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-FWQYL4Y4.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("prop typing",()=>{let o=[{a:1}],r=_chunkNIYVDIEQcjs.a.call(void 0, o,_chunkSXTSJOEEcjs.a.call(void 0, "a"));expectTypeOf(r).toEqualTypeOf();let f=_chunkY7L64OLNcjs.a.call(void 0, o,_chunkNIYVDIEQcjs.a.call(void 0, _chunkSXTSJOEEcjs.a.call(void 0, "a")));expectTypeOf(f).toEqualTypeOf()});
|
package/dist/prop.spec-d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-J3YPWVVQ.js";import{a as p}from"./chunk-USNHLUEU.js";import{a as e}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-J3YPWVVQ.js";import{a as p}from"./chunk-USNHLUEU.js";import{a as e}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JXXXUJM5.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("prop typing",()=>{let o=[{a:1}],r=t(o,p("a"));expectTypeOf(r).toEqualTypeOf();let f=e(o,t(p("a")));expectTypeOf(f).toEqualTypeOf()});
|
package/dist/pull-object.d.cts
CHANGED
package/dist/pull-object.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _chunkVEG55EJ6cjs = require('./chunk-VEG55EJ6.cjs');var
|
|
1
|
+
"use strict";var _chunkVEG55EJ6cjs = require('./chunk-VEG55EJ6.cjs');var _chunkAQRYBCA3cjs = require('./chunk-AQRYBCA3.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');test("string keys",()=>{let t=["a","b"],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, "value"));expectTypeOf(s).toEqualTypeOf();let o=_chunkY7L64OLNcjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, "value")));expectTypeOf(o).toEqualTypeOf()});test("number keys",()=>{let t=[1,2],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, 3));expectTypeOf(s).toEqualTypeOf();let o=_chunkY7L64OLNcjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, 3)));expectTypeOf(o).toEqualTypeOf()});test("symbol keys",()=>{let t=[Symbol("a"),Symbol("b")],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, Symbol("c")));expectTypeOf(s).toEqualTypeOf();let o=_chunkY7L64OLNcjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, Symbol("c"))));expectTypeOf(o).toEqualTypeOf()});test("number constants",()=>{let t=[1,2],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, 3));expectTypeOf(s).toEqualTypeOf();let o=_chunkY7L64OLNcjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, 3)));expectTypeOf(o).toEqualTypeOf()});test("string constants",()=>{let t=["a","b"],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, "c"));expectTypeOf(s).toEqualTypeOf();let o=_chunkY7L64OLNcjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkAQRYBCA3cjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, "c")));expectTypeOf(o).toEqualTypeOf()});test("literal unions keys",()=>{let t=[1,2],s=_chunkVEG55EJ6cjs.a.call(void 0, t,r=>r%2===0?"odd":"even",_chunkWLNQOMKLcjs.a.call(void 0, "c"));expectTypeOf(s).toEqualTypeOf();let o=_chunkY7L64OLNcjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, r=>r%2===0?"odd":"even",_chunkWLNQOMKLcjs.a.call(void 0, "c")));expectTypeOf(o).toEqualTypeOf()});test("template string keys",()=>{let t=[1,2],s=_chunkVEG55EJ6cjs.a.call(void 0, t,r=>`prefix_${r}`,_chunkWLNQOMKLcjs.a.call(void 0, "value"));expectTypeOf(s).toEqualTypeOf();let o=_chunkY7L64OLNcjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, r=>`prefix_${r}`,_chunkWLNQOMKLcjs.a.call(void 0, "value")));expectTypeOf(o).toEqualTypeOf()});
|