tuple-ts 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.d.ts +17 -8213
- package/dist/index.js +2 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -33,11 +33,10 @@ export const _tupleCache = new InternCache(hash.valuesHash, arrayEquivalent, Obj
|
|
|
33
33
|
export const tuple = defineTuple();
|
|
34
34
|
export const struct = (labels) => {
|
|
35
35
|
const cacheInjestFn = (tuple) => {
|
|
36
|
-
const labeledTuple = tuple;
|
|
37
36
|
labels.forEach((label, index) => {
|
|
38
|
-
|
|
37
|
+
tuple[label] = tuple[index];
|
|
39
38
|
});
|
|
40
|
-
return Object.freeze(
|
|
39
|
+
return Object.freeze(tuple);
|
|
41
40
|
};
|
|
42
41
|
const cache = new InternCache(hash.valuesHash, arrayEquivalent, cacheInjestFn);
|
|
43
42
|
return defineStruct(cache, labels);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "tuple-ts",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.3",
|
|
5
5
|
"description": "Tuples and structs for TypeScript and JavaScript with equality and identity semantics.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tuple",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsc",
|
|
38
|
-
"test": "vitest run src/",
|
|
38
|
+
"test": "tsc --noEmit && vitest run src/",
|
|
39
39
|
"prepare": "npm run build",
|
|
40
40
|
"prepublishOnly": "npm test"
|
|
41
41
|
},
|
|
42
42
|
"author": "George Bradley",
|
|
43
43
|
"license": "ISC",
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"typescript": "^
|
|
45
|
+
"typescript": "^7.0.2",
|
|
46
46
|
"vitest": "^5.0.5"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|