@carbonteq/fp 0.7.0 → 0.8.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tuple.d.cts DELETED
@@ -1,9 +0,0 @@
1
- declare const TUPLE_KEY: unique symbol;
2
- interface Tuple<Inner> extends Array<Inner> {
3
- [TUPLE_KEY]: boolean;
4
- }
5
- declare const setAsTuple: <Inner, T extends Array<Inner>>(arr: T) => Tuple<Inner>;
6
- declare const isTuple: <Inner>(t: unknown) => t is Tuple<Inner>;
7
- type AppendToTuple<T, U> = T extends [...infer Rest, infer L] ? [...Rest, L, U] : [T, U];
8
-
9
- export { type AppendToTuple, type Tuple, isTuple, setAsTuple };
package/dist/tuple.d.ts DELETED
@@ -1,9 +0,0 @@
1
- declare const TUPLE_KEY: unique symbol;
2
- interface Tuple<Inner> extends Array<Inner> {
3
- [TUPLE_KEY]: boolean;
4
- }
5
- declare const setAsTuple: <Inner, T extends Array<Inner>>(arr: T) => Tuple<Inner>;
6
- declare const isTuple: <Inner>(t: unknown) => t is Tuple<Inner>;
7
- type AppendToTuple<T, U> = T extends [...infer Rest, infer L] ? [...Rest, L, U] : [T, U];
8
-
9
- export { type AppendToTuple, type Tuple, isTuple, setAsTuple };
package/dist/tuple.js DELETED
@@ -1,18 +0,0 @@
1
- import {
2
- __name
3
- } from "./chunk-7QVYU63E.js";
4
- const TUPLE_KEY = Symbol.for("TUPLE");
5
- const setAsTuple = /* @__PURE__ */ __name((arr) => {
6
- const res = arr;
7
- res[TUPLE_KEY] = true;
8
- return res;
9
- }, "setAsTuple");
10
- const isTuple = /* @__PURE__ */ __name((t) => (
11
- //@ts-expect-error
12
- Object.hasOwn(t, TUPLE_KEY)
13
- ), "isTuple");
14
- export {
15
- isTuple,
16
- setAsTuple
17
- };
18
- //# sourceMappingURL=tuple.js.map
package/dist/tuple.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/tuple.ts"],"sourcesContent":["const TUPLE_KEY = Symbol.for(\"TUPLE\");\n\nexport interface Tuple<Inner> extends Array<Inner> {\n [TUPLE_KEY]: boolean;\n}\n\nexport const setAsTuple = <Inner, T extends Array<Inner>>(\n arr: T,\n): Tuple<Inner> => {\n //@ts-expect-error\n const res = arr as Tuple<Inner>;\n\n res[TUPLE_KEY] = true;\n\n return res;\n};\n\nexport const isTuple = <Inner>(t: unknown): t is Tuple<Inner> =>\n //@ts-expect-error\n Object.hasOwn(t, TUPLE_KEY);\n\nexport type AppendToTuple<T, U> = T extends [...infer Rest, infer L]\n ? [...Rest, L, U]\n : [T, U];\n"],"mappings":";;;AAAA,MAAMA,YAAYC,OAAOC,IAAI,OAAA;AAMtB,MAAMC,aAAa,wBACxBC,QAAAA;AAGA,QAAMC,MAAMD;AAEZC,MAAIL,SAAAA,IAAa;AAEjB,SAAOK;AACT,GAT0B;AAWnB,MAAMC,UAAU,wBAAQC;;EAE7BC,OAAOC,OAAOF,GAAGP,SAAAA;GAFI;","names":["TUPLE_KEY","Symbol","for","setAsTuple","arr","res","isTuple","t","Object","hasOwn"]}
package/dist/unit.cjs DELETED
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var unit_exports = {};
20
- __export(unit_exports, {
21
- UNIT: () => UNIT
22
- });
23
- module.exports = __toCommonJS(unit_exports);
24
- const UNIT = Symbol.for("UNIT");
25
- // Annotate the CommonJS export names for ESM import in node:
26
- 0 && (module.exports = {
27
- UNIT
28
- });
29
- //# sourceMappingURL=unit.cjs.map
package/dist/unit.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/unit.ts"],"sourcesContent":["export const UNIT = Symbol.for(\"UNIT\");\nexport type UNIT = typeof UNIT;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;AAAO,MAAMA,OAAOC,OAAOC,IAAI,MAAA;","names":["UNIT","Symbol","for"]}
package/dist/unit.d.cts DELETED
@@ -1,4 +0,0 @@
1
- declare const UNIT: unique symbol;
2
- type UNIT = typeof UNIT;
3
-
4
- export { UNIT };
package/dist/unit.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare const UNIT: unique symbol;
2
- type UNIT = typeof UNIT;
3
-
4
- export { UNIT };
package/dist/unit.js DELETED
@@ -1,6 +0,0 @@
1
- import "./chunk-7QVYU63E.js";
2
- const UNIT = Symbol.for("UNIT");
3
- export {
4
- UNIT
5
- };
6
- //# sourceMappingURL=unit.js.map
package/dist/unit.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/unit.ts"],"sourcesContent":["export const UNIT = Symbol.for(\"UNIT\");\nexport type UNIT = typeof UNIT;\n"],"mappings":";AAAO,MAAMA,OAAOC,OAAOC,IAAI,MAAA;","names":["UNIT","Symbol","for"]}