mirror: A fast canonicalisation utility for stable object equality
0

Configure Feed

Select the types of activity you want to include in your feed.

feat: author package with deno

Marais Rossouw (Mar 30, 2024, 4:50 PM +1000) 76e847b7 65f5ee81

+904 -1114
+31 -20
.github/workflows/ci.yml
··· 2 2 3 3 on: 4 4 push: 5 - branches: [main] 6 - pull_request: {} 5 + workflow_call: 7 6 8 7 jobs: 9 - test: 10 - name: Node.js v${{ matrix.node }} 8 + deno: 11 9 runs-on: ubuntu-latest 12 - strategy: 13 - matrix: 14 - node: [16, 18, 20] 15 10 steps: 16 - - uses: actions/checkout@main 11 + - uses: actions/checkout@v3 17 12 18 - - name: (env) setup pnpm 19 - uses: pnpm/action-setup@master 13 + - uses: denoland/setup-deno@v1 14 + with: 15 + deno-version: v1.x 16 + 17 + - run: deno fmt --check 18 + - run: deno lint 19 + - run: deno check **/*.ts 20 + 21 + - name: Tests 22 + run: |- 23 + deno test --coverage=cov/ 24 + deno coverage cov/ 25 + 26 + npm: 27 + runs-on: ubuntu-latest 28 + steps: 29 + - uses: actions/checkout@v3 30 + - uses: denoland/setup-deno@v1 20 31 with: 21 - version: 8.6.5 32 + deno-version: v1.x 33 + 34 + - run: deno task build 22 35 23 - - name: (env) setup node v${{ matrix.node }} 24 - uses: actions/setup-node@main 36 + benchmark: 37 + runs-on: ubuntu-latest 38 + steps: 39 + - uses: actions/checkout@v3 40 + - uses: denoland/setup-deno@v1 25 41 with: 26 - node-version: ${{ matrix.node }} 27 - cache: pnpm 28 - check-latest: true 42 + deno-version: v1.x 29 43 30 - - run: pnpm install --ignore-scripts 31 - - run: pnpm run build 32 - - run: pnpm run test 33 - - run: pnpm run typecheck 44 + - run: deno run bench/index.ts
+4 -16
.gitignore
··· 1 - node_modules 2 1 .DS_Store 3 - *-lock.json 4 - *.lock 5 - *.log 6 - 7 - /coverage 8 - /.nyc_output 9 - 10 - # Editors 11 - *.iml 12 - /.idea 13 - /.vscode 14 - 15 - /index.js 16 - /index.mjs 17 - /index.d.ts 2 + node_modules 3 + /npm 4 + *.lcov 5 + /cov
-1
.prettierignore
··· 1 - .gitignore
+1
bench/deno.json
··· 1 + {}
+133
bench/deno.lock
··· 1 + { 2 + "version": "3", 3 + "packages": { 4 + "specifiers": { 5 + "npm:@marais/bench": "npm:@marais/bench@0.0.8", 6 + "npm:json-stable-stringify": "npm:json-stable-stringify@1.1.1", 7 + "npm:object-hash": "npm:object-hash@3.0.0" 8 + }, 9 + "npm": { 10 + "@marais/bench@0.0.8": { 11 + "integrity": "sha512-DZ3TqK1eUN77E2nV2Aj2aady61rveJGqGAPNQglzoJL001HJq9elFLRS6pw25e6geIEmRld9cJ5F/EHFUYa+DQ==", 12 + "dependencies": { 13 + "@thi.ng/bench": "@thi.ng/bench@3.5.1" 14 + } 15 + }, 16 + "@thi.ng/api@8.9.31": { 17 + "integrity": "sha512-YuodNQ4TnxV8OIa8xiF9JQ+vBam16W3Z9EbTAAgX/VlQUQ7NEVBbFO8eNGcpyrfOoWdSX4b9JcPbAXuB1dfg1g==", 18 + "dependencies": {} 19 + }, 20 + "@thi.ng/bench@3.5.1": { 21 + "integrity": "sha512-ekueeRFmWdXiCB9vnZxzOXKJ9s6ol3injV79hHZXrL+XqjPiP9VyX4fnVvQ/vTCzR27+wYM8fbz3S1veUEF84w==", 22 + "dependencies": { 23 + "@thi.ng/api": "@thi.ng/api@8.9.31" 24 + } 25 + }, 26 + "call-bind@1.0.7": { 27 + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", 28 + "dependencies": { 29 + "es-define-property": "es-define-property@1.0.0", 30 + "es-errors": "es-errors@1.3.0", 31 + "function-bind": "function-bind@1.1.2", 32 + "get-intrinsic": "get-intrinsic@1.2.4", 33 + "set-function-length": "set-function-length@1.2.2" 34 + } 35 + }, 36 + "define-data-property@1.1.4": { 37 + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", 38 + "dependencies": { 39 + "es-define-property": "es-define-property@1.0.0", 40 + "es-errors": "es-errors@1.3.0", 41 + "gopd": "gopd@1.0.1" 42 + } 43 + }, 44 + "es-define-property@1.0.0": { 45 + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", 46 + "dependencies": { 47 + "get-intrinsic": "get-intrinsic@1.2.4" 48 + } 49 + }, 50 + "es-errors@1.3.0": { 51 + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 52 + "dependencies": {} 53 + }, 54 + "function-bind@1.1.2": { 55 + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 56 + "dependencies": {} 57 + }, 58 + "get-intrinsic@1.2.4": { 59 + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", 60 + "dependencies": { 61 + "es-errors": "es-errors@1.3.0", 62 + "function-bind": "function-bind@1.1.2", 63 + "has-proto": "has-proto@1.0.3", 64 + "has-symbols": "has-symbols@1.0.3", 65 + "hasown": "hasown@2.0.2" 66 + } 67 + }, 68 + "gopd@1.0.1": { 69 + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 70 + "dependencies": { 71 + "get-intrinsic": "get-intrinsic@1.2.4" 72 + } 73 + }, 74 + "has-property-descriptors@1.0.2": { 75 + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", 76 + "dependencies": { 77 + "es-define-property": "es-define-property@1.0.0" 78 + } 79 + }, 80 + "has-proto@1.0.3": { 81 + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", 82 + "dependencies": {} 83 + }, 84 + "has-symbols@1.0.3": { 85 + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 86 + "dependencies": {} 87 + }, 88 + "hasown@2.0.2": { 89 + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 90 + "dependencies": { 91 + "function-bind": "function-bind@1.1.2" 92 + } 93 + }, 94 + "isarray@2.0.5": { 95 + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", 96 + "dependencies": {} 97 + }, 98 + "json-stable-stringify@1.1.1": { 99 + "integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==", 100 + "dependencies": { 101 + "call-bind": "call-bind@1.0.7", 102 + "isarray": "isarray@2.0.5", 103 + "jsonify": "jsonify@0.0.1", 104 + "object-keys": "object-keys@1.1.1" 105 + } 106 + }, 107 + "jsonify@0.0.1": { 108 + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", 109 + "dependencies": {} 110 + }, 111 + "object-hash@3.0.0": { 112 + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", 113 + "dependencies": {} 114 + }, 115 + "object-keys@1.1.1": { 116 + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 117 + "dependencies": {} 118 + }, 119 + "set-function-length@1.2.2": { 120 + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", 121 + "dependencies": { 122 + "define-data-property": "define-data-property@1.1.4", 123 + "es-errors": "es-errors@1.3.0", 124 + "function-bind": "function-bind@1.1.2", 125 + "get-intrinsic": "get-intrinsic@1.2.4", 126 + "gopd": "gopd@1.0.1", 127 + "has-property-descriptors": "has-property-descriptors@1.0.2" 128 + } 129 + } 130 + } 131 + }, 132 + "remote": {} 133 + }
+7 -6
bench/index.js bench/index.ts
··· 1 - import { suite } from '@marais/bench'; 1 + import { suite } from 'npm:@marais/bench'; 2 + 3 + import objectHash from 'npm:object-hash'; 4 + import jsonStableStringify from 'npm:json-stable-stringify'; 2 5 3 - import objectHash from 'object-hash'; 4 - import { identify } from 'object-identity'; 5 - import jsonStableStringify from 'json-stable-stringify'; 6 + import { identify } from '../mod.ts'; 6 7 7 8 const getObject = () => { 8 9 const c = [1]; 9 - // @ts-ignore 10 + // @ts-expect-error circular 10 11 c.push(c); 11 12 return { 12 13 a: { b: ['c', new Set(['d', new Map([['e', 'f']]), c, 'g'])] }, ··· 15 16 }; 16 17 }; 17 18 18 - suite( 19 + suite<any>( 19 20 { 20 21 'object-identity'() { 21 22 return (o) => identify(o);
-9
bench/package.json
··· 1 - { 2 - "type": "module", 3 - "dependencies": { 4 - "@marais/bench": "0.0.8", 5 - "json-stable-stringify": "^1.0.2", 6 - "object-hash": "^3.0.0", 7 - "object-identity": "file:.." 8 - } 9 - }
-59
bench/pnpm-lock.yaml
··· 1 - lockfileVersion: '6.0' 2 - 3 - settings: 4 - autoInstallPeers: true 5 - excludeLinksFromLockfile: false 6 - 7 - dependencies: 8 - '@marais/bench': 9 - specifier: 0.0.8 10 - version: 0.0.8 11 - json-stable-stringify: 12 - specifier: ^1.0.2 13 - version: 1.0.2 14 - object-hash: 15 - specifier: ^3.0.0 16 - version: 3.0.0 17 - object-identity: 18 - specifier: file:.. 19 - version: file:.. 20 - 21 - packages: 22 - 23 - /@marais/bench@0.0.8: 24 - resolution: {integrity: sha512-DZ3TqK1eUN77E2nV2Aj2aady61rveJGqGAPNQglzoJL001HJq9elFLRS6pw25e6geIEmRld9cJ5F/EHFUYa+DQ==} 25 - dependencies: 26 - '@thi.ng/bench': 3.4.0 27 - dev: false 28 - 29 - /@thi.ng/api@8.8.2: 30 - resolution: {integrity: sha512-kJCBKhHEYv/gSnbrCGnEgoAX/9bRmVSttQ0GVqQIdJlW3IFlgtz3kz357zcYNQ8mB6cY87e0XxJY3VdbYsgiyQ==} 31 - engines: {node: '>=12.7'} 32 - dev: false 33 - 34 - /@thi.ng/bench@3.4.0: 35 - resolution: {integrity: sha512-eY28lsU/7mxV2KrPebo5DTKMDslWDNTcKNNomNcJMKfdDSPmb5Mb7InqekPuv8K2iAC1EVghFBHCi/lIO22qFg==} 36 - engines: {node: '>=12.7'} 37 - dependencies: 38 - '@thi.ng/api': 8.8.2 39 - dev: false 40 - 41 - /json-stable-stringify@1.0.2: 42 - resolution: {integrity: sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==} 43 - dependencies: 44 - jsonify: 0.0.1 45 - dev: false 46 - 47 - /jsonify@0.0.1: 48 - resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} 49 - dev: false 50 - 51 - /object-hash@3.0.0: 52 - resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} 53 - engines: {node: '>= 6'} 54 - dev: false 55 - 56 - file:..: 57 - resolution: {directory: .., type: directory} 58 - name: object-identity 59 - dev: false
+32
deno.json
··· 1 + { 2 + "version": "0.1.2", 3 + "name": "@mr/object-identity", 4 + "exports": "./mod.ts", 5 + "tasks": { 6 + "build": "deno run -A scripts/build.ts" 7 + }, 8 + "imports": { 9 + "@deno/dnt": "jsr:@deno/dnt@^0.41.0", 10 + "@std/assert": "jsr:@std/assert@^0.221.0" 11 + }, 12 + "lint": { 13 + "rules": { 14 + "exclude": [ 15 + "no-var", 16 + "prefer-const", 17 + "no-cond-assign", 18 + "no-inner-declarations", 19 + "no-explicit-any", 20 + "no-fallthrough" 21 + ] 22 + } 23 + }, 24 + "fmt": { 25 + "lineWidth": 100, 26 + "singleQuote": true, 27 + "useTabs": true 28 + }, 29 + "exclude": [ 30 + "npm" 31 + ] 32 + }
+357
deno.lock
··· 1 + { 2 + "version": "3", 3 + "packages": { 4 + "specifiers": { 5 + "jsr:@deno/cache-dir@^0.8.0": "jsr:@deno/cache-dir@0.8.0", 6 + "jsr:@deno/dnt@^0.41.0": "jsr:@deno/dnt@0.41.1", 7 + "jsr:@deno/graph@^0.69.7": "jsr:@deno/graph@0.69.10", 8 + "jsr:@std/assert@^0.218.2": "jsr:@std/assert@0.218.2", 9 + "jsr:@std/assert@^0.221.0": "jsr:@std/assert@0.221.0", 10 + "jsr:@std/bytes@^0.218.2": "jsr:@std/bytes@0.218.2", 11 + "jsr:@std/fmt@^0.218.2": "jsr:@std/fmt@0.218.2", 12 + "jsr:@std/fmt@^0.221.0": "jsr:@std/fmt@0.221.0", 13 + "jsr:@std/fs@^0.218.2": "jsr:@std/fs@0.218.2", 14 + "jsr:@std/io@^0.218.2": "jsr:@std/io@0.218.2", 15 + "jsr:@std/path@^0.218.2": "jsr:@std/path@0.218.2", 16 + "npm:@marais/bench": "npm:@marais/bench@0.0.8", 17 + "npm:@ts-morph/bootstrap@0.22": "npm:@ts-morph/bootstrap@0.22.0", 18 + "npm:code-block-writer@^13.0.1": "npm:code-block-writer@13.0.1", 19 + "npm:json-stable-stringify": "npm:json-stable-stringify@1.1.1", 20 + "npm:object-hash": "npm:object-hash@3.0.0" 21 + }, 22 + "jsr": { 23 + "@deno/cache-dir@0.8.0": { 24 + "integrity": "e87e80a404958f6350d903e6238b72afb92468378b0b32111f7a1e4916ac7fe7", 25 + "dependencies": [ 26 + "jsr:@deno/graph@^0.69.7", 27 + "jsr:@std/fs@^0.218.2", 28 + "jsr:@std/io@^0.218.2" 29 + ] 30 + }, 31 + "@deno/dnt@0.41.1": { 32 + "integrity": "8746a773e031ae19ef43d0eece850217b76cf1d0118fdd8e059652d7023d4aff", 33 + "dependencies": [ 34 + "jsr:@deno/cache-dir@^0.8.0", 35 + "jsr:@std/fmt@^0.218.2", 36 + "jsr:@std/fs@^0.218.2", 37 + "jsr:@std/path@^0.218.2", 38 + "npm:@ts-morph/bootstrap@0.22", 39 + "npm:code-block-writer@^13.0.1" 40 + ] 41 + }, 42 + "@deno/graph@0.69.10": { 43 + "integrity": "38fe22ac5686f6ece5daeec5a4df65c6314d7d32adcc33f77917a13cfaffa26f" 44 + }, 45 + "@std/assert@0.218.2": { 46 + "integrity": "7f0a5a1a8cf86607cd6c2c030584096e1ffad27fc9271429a8cb48cfbdee5eaf" 47 + }, 48 + "@std/assert@0.221.0": { 49 + "integrity": "a5f1aa6e7909dbea271754fd4ab3f4e687aeff4873b4cef9a320af813adb489a", 50 + "dependencies": [ 51 + "jsr:@std/fmt@^0.221.0" 52 + ] 53 + }, 54 + "@std/bytes@0.218.2": { 55 + "integrity": "91fe54b232dcca73856b79a817247f4a651dbb60d51baafafb6408c137241670" 56 + }, 57 + "@std/fmt@0.218.2": { 58 + "integrity": "99526449d2505aa758b6cbef81e7dd471d8b28ec0dcb1491d122b284c548788a" 59 + }, 60 + "@std/fmt@0.221.0": { 61 + "integrity": "379fed69bdd9731110f26b9085aeb740606b20428ce6af31ef6bd45ef8efa62a" 62 + }, 63 + "@std/fs@0.218.2": { 64 + "integrity": "dd9431453f7282e8c577cc22c9e6d036055a9a980b5549f887d6012969fabcca", 65 + "dependencies": [ 66 + "jsr:@std/assert@^0.218.2", 67 + "jsr:@std/path@^0.218.2" 68 + ] 69 + }, 70 + "@std/io@0.218.2": { 71 + "integrity": "c64fbfa087b7c9d4d386c5672f291f607d88cb7d44fc299c20c713e345f2785f", 72 + "dependencies": [ 73 + "jsr:@std/bytes@^0.218.2" 74 + ] 75 + }, 76 + "@std/path@0.218.2": { 77 + "integrity": "b568fd923d9e53ad76d17c513e7310bda8e755a3e825e6289a0ce536404e2662", 78 + "dependencies": [ 79 + "jsr:@std/assert@^0.218.2" 80 + ] 81 + } 82 + }, 83 + "npm": { 84 + "@marais/bench@0.0.8": { 85 + "integrity": "sha512-DZ3TqK1eUN77E2nV2Aj2aady61rveJGqGAPNQglzoJL001HJq9elFLRS6pw25e6geIEmRld9cJ5F/EHFUYa+DQ==", 86 + "dependencies": { 87 + "@thi.ng/bench": "@thi.ng/bench@3.5.1" 88 + } 89 + }, 90 + "@nodelib/fs.scandir@2.1.5": { 91 + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", 92 + "dependencies": { 93 + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", 94 + "run-parallel": "run-parallel@1.2.0" 95 + } 96 + }, 97 + "@nodelib/fs.stat@2.0.5": { 98 + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", 99 + "dependencies": {} 100 + }, 101 + "@nodelib/fs.walk@1.2.8": { 102 + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", 103 + "dependencies": { 104 + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", 105 + "fastq": "fastq@1.17.1" 106 + } 107 + }, 108 + "@thi.ng/api@8.9.31": { 109 + "integrity": "sha512-YuodNQ4TnxV8OIa8xiF9JQ+vBam16W3Z9EbTAAgX/VlQUQ7NEVBbFO8eNGcpyrfOoWdSX4b9JcPbAXuB1dfg1g==", 110 + "dependencies": {} 111 + }, 112 + "@thi.ng/bench@3.5.1": { 113 + "integrity": "sha512-ekueeRFmWdXiCB9vnZxzOXKJ9s6ol3injV79hHZXrL+XqjPiP9VyX4fnVvQ/vTCzR27+wYM8fbz3S1veUEF84w==", 114 + "dependencies": { 115 + "@thi.ng/api": "@thi.ng/api@8.9.31" 116 + } 117 + }, 118 + "@ts-morph/bootstrap@0.22.0": { 119 + "integrity": "sha512-MI5q7pid4swAlE2lcHwHRa6rcjoIMyT6fy8uuZm8BGg7DHGi/H5bQ0GMZzbk3N0r/LfStMdOYPkl+3IwvfIQ2g==", 120 + "dependencies": { 121 + "@ts-morph/common": "@ts-morph/common@0.22.0" 122 + } 123 + }, 124 + "@ts-morph/common@0.22.0": { 125 + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", 126 + "dependencies": { 127 + "fast-glob": "fast-glob@3.3.2", 128 + "minimatch": "minimatch@9.0.4", 129 + "mkdirp": "mkdirp@3.0.1", 130 + "path-browserify": "path-browserify@1.0.1" 131 + } 132 + }, 133 + "balanced-match@1.0.2": { 134 + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 135 + "dependencies": {} 136 + }, 137 + "brace-expansion@2.0.1": { 138 + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 139 + "dependencies": { 140 + "balanced-match": "balanced-match@1.0.2" 141 + } 142 + }, 143 + "braces@3.0.2": { 144 + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 145 + "dependencies": { 146 + "fill-range": "fill-range@7.0.1" 147 + } 148 + }, 149 + "call-bind@1.0.7": { 150 + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", 151 + "dependencies": { 152 + "es-define-property": "es-define-property@1.0.0", 153 + "es-errors": "es-errors@1.3.0", 154 + "function-bind": "function-bind@1.1.2", 155 + "get-intrinsic": "get-intrinsic@1.2.4", 156 + "set-function-length": "set-function-length@1.2.2" 157 + } 158 + }, 159 + "code-block-writer@13.0.1": { 160 + "integrity": "sha512-c5or4P6erEA69TxaxTNcHUNcIn+oyxSRTOWV+pSYF+z4epXqNvwvJ70XPGjPNgue83oAFAPBRQYwpAJ/Hpe/Sg==", 161 + "dependencies": {} 162 + }, 163 + "define-data-property@1.1.4": { 164 + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", 165 + "dependencies": { 166 + "es-define-property": "es-define-property@1.0.0", 167 + "es-errors": "es-errors@1.3.0", 168 + "gopd": "gopd@1.0.1" 169 + } 170 + }, 171 + "es-define-property@1.0.0": { 172 + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", 173 + "dependencies": { 174 + "get-intrinsic": "get-intrinsic@1.2.4" 175 + } 176 + }, 177 + "es-errors@1.3.0": { 178 + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 179 + "dependencies": {} 180 + }, 181 + "fast-glob@3.3.2": { 182 + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", 183 + "dependencies": { 184 + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", 185 + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", 186 + "glob-parent": "glob-parent@5.1.2", 187 + "merge2": "merge2@1.4.1", 188 + "micromatch": "micromatch@4.0.5" 189 + } 190 + }, 191 + "fastq@1.17.1": { 192 + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", 193 + "dependencies": { 194 + "reusify": "reusify@1.0.4" 195 + } 196 + }, 197 + "fill-range@7.0.1": { 198 + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 199 + "dependencies": { 200 + "to-regex-range": "to-regex-range@5.0.1" 201 + } 202 + }, 203 + "function-bind@1.1.2": { 204 + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 205 + "dependencies": {} 206 + }, 207 + "get-intrinsic@1.2.4": { 208 + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", 209 + "dependencies": { 210 + "es-errors": "es-errors@1.3.0", 211 + "function-bind": "function-bind@1.1.2", 212 + "has-proto": "has-proto@1.0.3", 213 + "has-symbols": "has-symbols@1.0.3", 214 + "hasown": "hasown@2.0.2" 215 + } 216 + }, 217 + "glob-parent@5.1.2": { 218 + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 219 + "dependencies": { 220 + "is-glob": "is-glob@4.0.3" 221 + } 222 + }, 223 + "gopd@1.0.1": { 224 + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 225 + "dependencies": { 226 + "get-intrinsic": "get-intrinsic@1.2.4" 227 + } 228 + }, 229 + "has-property-descriptors@1.0.2": { 230 + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", 231 + "dependencies": { 232 + "es-define-property": "es-define-property@1.0.0" 233 + } 234 + }, 235 + "has-proto@1.0.3": { 236 + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", 237 + "dependencies": {} 238 + }, 239 + "has-symbols@1.0.3": { 240 + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 241 + "dependencies": {} 242 + }, 243 + "hasown@2.0.2": { 244 + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 245 + "dependencies": { 246 + "function-bind": "function-bind@1.1.2" 247 + } 248 + }, 249 + "is-extglob@2.1.1": { 250 + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 251 + "dependencies": {} 252 + }, 253 + "is-glob@4.0.3": { 254 + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 255 + "dependencies": { 256 + "is-extglob": "is-extglob@2.1.1" 257 + } 258 + }, 259 + "is-number@7.0.0": { 260 + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 261 + "dependencies": {} 262 + }, 263 + "isarray@2.0.5": { 264 + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", 265 + "dependencies": {} 266 + }, 267 + "json-stable-stringify@1.1.1": { 268 + "integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==", 269 + "dependencies": { 270 + "call-bind": "call-bind@1.0.7", 271 + "isarray": "isarray@2.0.5", 272 + "jsonify": "jsonify@0.0.1", 273 + "object-keys": "object-keys@1.1.1" 274 + } 275 + }, 276 + "jsonify@0.0.1": { 277 + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", 278 + "dependencies": {} 279 + }, 280 + "merge2@1.4.1": { 281 + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", 282 + "dependencies": {} 283 + }, 284 + "micromatch@4.0.5": { 285 + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", 286 + "dependencies": { 287 + "braces": "braces@3.0.2", 288 + "picomatch": "picomatch@2.3.1" 289 + } 290 + }, 291 + "minimatch@9.0.4": { 292 + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", 293 + "dependencies": { 294 + "brace-expansion": "brace-expansion@2.0.1" 295 + } 296 + }, 297 + "mkdirp@3.0.1": { 298 + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", 299 + "dependencies": {} 300 + }, 301 + "object-hash@3.0.0": { 302 + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", 303 + "dependencies": {} 304 + }, 305 + "object-keys@1.1.1": { 306 + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 307 + "dependencies": {} 308 + }, 309 + "path-browserify@1.0.1": { 310 + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", 311 + "dependencies": {} 312 + }, 313 + "picomatch@2.3.1": { 314 + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 315 + "dependencies": {} 316 + }, 317 + "queue-microtask@1.2.3": { 318 + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", 319 + "dependencies": {} 320 + }, 321 + "reusify@1.0.4": { 322 + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 323 + "dependencies": {} 324 + }, 325 + "run-parallel@1.2.0": { 326 + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 327 + "dependencies": { 328 + "queue-microtask": "queue-microtask@1.2.3" 329 + } 330 + }, 331 + "set-function-length@1.2.2": { 332 + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", 333 + "dependencies": { 334 + "define-data-property": "define-data-property@1.1.4", 335 + "es-errors": "es-errors@1.3.0", 336 + "function-bind": "function-bind@1.1.2", 337 + "get-intrinsic": "get-intrinsic@1.2.4", 338 + "gopd": "gopd@1.0.1", 339 + "has-property-descriptors": "has-property-descriptors@1.0.2" 340 + } 341 + }, 342 + "to-regex-range@5.0.1": { 343 + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 344 + "dependencies": { 345 + "is-number": "is-number@7.0.0" 346 + } 347 + } 348 + } 349 + }, 350 + "remote": {}, 351 + "workspace": { 352 + "dependencies": [ 353 + "jsr:@deno/dnt@^0.41.0", 354 + "jsr:@std/assert@^0.221.0" 355 + ] 356 + } 357 + }
+252
mod.test.ts
··· 1 + import { 2 + assert, 3 + assertEquals, 4 + assertInstanceOf, 5 + assertNotEquals, 6 + assertNotMatch, 7 + } from '@std/assert'; 8 + import { identify } from './mod.ts'; 9 + 10 + Deno.test('exports', () => { 11 + assertInstanceOf(identify, Function); 12 + }); 13 + 14 + Deno.test('arrays :: flat', () => { 15 + assertEquals(identify([1, 2, 3]), identify([1, 2, 3])); 16 + }); 17 + 18 + Deno.test('arrays :: order should not matter', () => { 19 + assertNotEquals(identify([3, 2, 1]), identify([1, 2, 3])); 20 + }); 21 + 22 + Deno.test('arrays :: nested', () => { 23 + assertEquals( 24 + identify([ 25 + [3, 2, 1], 26 + [1, 2, 3], 27 + ]), 28 + identify([ 29 + [3, 2, 1], 30 + [1, 2, 3], 31 + ]), 32 + ); 33 + }); 34 + 35 + Deno.test('arrays :: circular', () => { 36 + const arr = [1, 2, 3]; 37 + // @ts-expect-error circular 38 + arr.push(arr); 39 + assert(identify(arr)); 40 + assertEquals(identify(arr), 'a123~1'); 41 + assertEquals(identify(arr), identify(arr)); 42 + }); 43 + 44 + Deno.test('objects :: basic', () => { 45 + assertEquals(identify({ foo: 'bar' }), identify({ foo: 'bar' })); 46 + }); 47 + 48 + Deno.test('objects :: key ordering', () => { 49 + assertEquals( 50 + identify({ one: 'one', two: 'two' }), 51 + identify({ two: 'two', one: 'one' }), 52 + ); 53 + }); 54 + 55 + Deno.test('objects :: complex keys', () => { 56 + const d = Date.now(); 57 + assertEquals( 58 + identify({ [123]: 'one', [d]: 'two' }), 59 + identify({ 60 + [123]: 'one', 61 + [d]: 'two', 62 + }), 63 + ); 64 + }); 65 + 66 + Deno.test('objects :: nested', () => { 67 + assertEquals( 68 + identify({ a: { b: 'c' }, d: { e: { f: 'g' } } }), 69 + identify({ 70 + d: { e: { f: 'g' } }, 71 + a: { b: 'c' }, 72 + }), 73 + ); 74 + }); 75 + 76 + Deno.test('objects :: circular', () => { 77 + const o = { a: 'b' }; 78 + // @ts-expect-error circular 79 + o['c'] = o; 80 + assert(identify(o)); 81 + assertEquals(identify(o), identify(o)); 82 + }); 83 + 84 + Deno.test('objects :: partial circular', () => { 85 + const o = { v: 1 }; 86 + const a = ['a', o]; 87 + assertEquals(identify(a), identify(a)); 88 + }); 89 + 90 + // Right now they do match, because the o1 lookup is the same as o2 91 + // as the reference is still the same, so the weakmap is the same 92 + /*Objects.skip('with samey circular shoudlnt match', () => { 93 + const o1: any = { a: 1, b: 2 }; 94 + const o2: any = { a: 1, b: 2 }; 95 + o1['c'] = o1; 96 + o1['d'] = o2; 97 + 98 + o2['c'] = o2; // 👈 #1 99 + 100 + const a = identify(o1); 101 + 102 + o2['c'] = o1; // 👈 different from #1 103 + 104 + const b = identify(o1); 105 + 106 + assertNotEquals(a, b, `${a} != ${b}`); 107 + });*/ 108 + 109 + Deno.test('objects :: same values between types shouldnt match', () => { 110 + assertNotEquals(identify({ a: 'b' }), identify(['a', 'b'])); 111 + }); 112 + 113 + Deno.test('objects :: same hash for Map or Object', () => { 114 + assertEquals(identify({ a: 'b' }), identify(new Map([['a', 'b']]))); 115 + }); 116 + 117 + Deno.test('sets :: shouldnt be ordered', () => { 118 + assertNotEquals( 119 + identify(new Set([1, 2, 3])), 120 + identify(new Set([3, 2, 1])), 121 + ); 122 + }); 123 + 124 + Deno.test('sets :: shouldnt be ordered', () => { 125 + assertNotEquals( 126 + identify(new Set([{ a: 'a' }, { b: 'b' }])), 127 + identify(new Set([{ b: 'b' }, { a: 'a' }])), 128 + ); 129 + }); 130 + 131 + Deno.test('sets :: circular', () => { 132 + const s = new Set([1, 2, 3]); 133 + // @ts-expect-error circular 134 + s.add(s); 135 + assert(identify(s)); 136 + assertEquals(identify(s), identify(s)); 137 + }); 138 + 139 + Deno.test('maps :: basic', () => { 140 + assertEquals( 141 + identify( 142 + new Map([ 143 + ['a', 'b'], 144 + ['c', 'd'], 145 + ]), 146 + ), 147 + identify( 148 + new Map([ 149 + ['c', 'd'], 150 + ['a', 'b'], 151 + ]), 152 + ), 153 + ); 154 + }); 155 + 156 + Deno.test('maps :: circular', () => { 157 + const m = new Map([ 158 + ['a', 'b'], 159 + ['c', 'd'], 160 + ]); 161 + // @ts-expect-error circular 162 + m.set('e', m); 163 + assert(identify(m)); 164 + assertEquals(identify(m), identify(m)); 165 + }); 166 + 167 + Deno.test('values :: primitives', () => { 168 + const t = (v: any) => 169 + assertEquals( 170 + identify(v), 171 + identify(v), 172 + `Value ${v} should have hashed correctly.`, 173 + ); 174 + 175 + t('test'); 176 + t(new Date()); 177 + t(NaN); 178 + t(true); 179 + t(false); 180 + t(/test/); 181 + t(123); 182 + t(null); 183 + t(undefined); 184 + // TODO: Solve for symbols 185 + // t(Symbol()); 186 + // t(Symbol("test")); 187 + }); 188 + 189 + Deno.test('values :: circular ref should be consistent', () => { 190 + let o: any = { a: 1, c: 2 }; 191 + o.b = o; 192 + o.d = new Map(); // the map is seen 2nd 193 + o.d.set('x', o.d); 194 + 195 + assertEquals(Object.keys(o), ['a', 'c', 'b', 'd']); 196 + 197 + const a = identify(o); 198 + 199 + o = { a: 1 }; 200 + o.d = new Map(); // the map is seen first 201 + o.d.set('x', o.d); 202 + o.b = o; 203 + o.c = 2; 204 + 205 + assertEquals(Object.keys(o), ['a', 'd', 'b', 'c']); 206 + 207 + const b = identify(o); 208 + 209 + // the circular ref should be the same 210 + assertEquals(a, b, `${a} === ${b}`); 211 + }); 212 + 213 + Deno.test('values :: circular deeply nested objects should equal', () => { 214 + const o1: any = { 215 + b: { 216 + c: 123, 217 + }, 218 + }; 219 + 220 + o1.b.d = o1; 221 + o1.x = [9, o1.b]; 222 + 223 + const o2: any = { 224 + b: { 225 + c: 123, 226 + }, 227 + }; 228 + 229 + o2.b.d = o2; 230 + o2.x = [9, o2.b]; 231 + const a = identify(o1); 232 + const b = identify(o2); 233 + assertEquals(a, b, `${a} === ${b}`); 234 + }); 235 + 236 + Deno.test('values :: all elements visited', () => { 237 + const c = [1]; 238 + // @ts-expect-error circular 239 + c.push(c); 240 + const hash = identify({ 241 + a: { b: ['c', new Set(['d', new Map([['e', 'f']]), c, 'g'])] }, 242 + }); 243 + assertEquals(hash, 'oaobacadoefa1~5g'); 244 + }); 245 + 246 + Deno.test('values :: should only be seen once', () => { 247 + const hash = identify({ 248 + a: [[1], [2], [3]], 249 + b: new Set([new Set([1]), new Set([2]), new Set([3])]), 250 + }); 251 + assertNotMatch(hash, /~\d+/); 252 + });
-43
package.json
··· 1 - { 2 - "name": "object-identity", 3 - "version": "0.1.2", 4 - "repository": "maraisr/object-identity", 5 - "license": "MIT", 6 - "author": "Marais Rossow <me@marais.dev> (https://marais.io)", 7 - "sideEffects": false, 8 - "exports": { 9 - ".": { 10 - "types": "./index.d.ts", 11 - "import": "./index.mjs", 12 - "require": "./index.js" 13 - }, 14 - "./package.json": "./package.json" 15 - }, 16 - "main": "index.js", 17 - "module": "index.mjs", 18 - "types": "index.d.ts", 19 - "files": [ 20 - "index.js", 21 - "index.mjs", 22 - "index.d.ts" 23 - ], 24 - "scripts": { 25 - "bench": "node bench/index.js", 26 - "build": "bundt --minify", 27 - "format": "prettier --write .", 28 - "test": "uvu src \".test.ts$\" -r tsm", 29 - "typecheck": "tsc --noEmit" 30 - }, 31 - "prettier": "@marais/prettier", 32 - "devDependencies": { 33 - "@marais/prettier": "0.0.4", 34 - "@marais/tsconfig": "0.0.4", 35 - "bundt": "2.0.0-next.5", 36 - "tsm": "2.3.0", 37 - "typescript": "5.1.3", 38 - "uvu": "0.5.4" 39 - }, 40 - "volta": { 41 - "node": "18.16.1" 42 - } 43 - }
-626
pnpm-lock.yaml
··· 1 - lockfileVersion: '6.0' 2 - 3 - settings: 4 - autoInstallPeers: true 5 - excludeLinksFromLockfile: false 6 - 7 - devDependencies: 8 - '@marais/prettier': 9 - specifier: 0.0.4 10 - version: 0.0.4 11 - '@marais/tsconfig': 12 - specifier: 0.0.4 13 - version: 0.0.4 14 - bundt: 15 - specifier: 2.0.0-next.5 16 - version: 2.0.0-next.5 17 - tsm: 18 - specifier: 2.3.0 19 - version: 2.3.0 20 - typescript: 21 - specifier: 5.1.3 22 - version: 5.1.3 23 - uvu: 24 - specifier: 0.5.4 25 - version: 0.5.4 26 - 27 - packages: 28 - 29 - /@esbuild/android-arm@0.15.18: 30 - resolution: {integrity: sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==} 31 - engines: {node: '>=12'} 32 - cpu: [arm] 33 - os: [android] 34 - requiresBuild: true 35 - dev: true 36 - optional: true 37 - 38 - /@esbuild/linux-loong64@0.14.54: 39 - resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==} 40 - engines: {node: '>=12'} 41 - cpu: [loong64] 42 - os: [linux] 43 - requiresBuild: true 44 - dev: true 45 - optional: true 46 - 47 - /@esbuild/linux-loong64@0.15.18: 48 - resolution: {integrity: sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==} 49 - engines: {node: '>=12'} 50 - cpu: [loong64] 51 - os: [linux] 52 - requiresBuild: true 53 - dev: true 54 - optional: true 55 - 56 - /@jridgewell/gen-mapping@0.3.3: 57 - resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} 58 - engines: {node: '>=6.0.0'} 59 - dependencies: 60 - '@jridgewell/set-array': 1.1.2 61 - '@jridgewell/sourcemap-codec': 1.4.15 62 - '@jridgewell/trace-mapping': 0.3.18 63 - dev: true 64 - 65 - /@jridgewell/resolve-uri@3.1.0: 66 - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} 67 - engines: {node: '>=6.0.0'} 68 - dev: true 69 - 70 - /@jridgewell/set-array@1.1.2: 71 - resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} 72 - engines: {node: '>=6.0.0'} 73 - dev: true 74 - 75 - /@jridgewell/source-map@0.3.3: 76 - resolution: {integrity: sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==} 77 - dependencies: 78 - '@jridgewell/gen-mapping': 0.3.3 79 - '@jridgewell/trace-mapping': 0.3.18 80 - dev: true 81 - 82 - /@jridgewell/sourcemap-codec@1.4.14: 83 - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} 84 - dev: true 85 - 86 - /@jridgewell/sourcemap-codec@1.4.15: 87 - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} 88 - dev: true 89 - 90 - /@jridgewell/trace-mapping@0.3.18: 91 - resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} 92 - dependencies: 93 - '@jridgewell/resolve-uri': 3.1.0 94 - '@jridgewell/sourcemap-codec': 1.4.14 95 - dev: true 96 - 97 - /@marais/prettier@0.0.4: 98 - resolution: {integrity: sha512-fcJgHALkAkmOyMEioqMaikXlUQLy9jj+SZjlI2AD9V0vEO1EjR3ZI5vz3y6A0Bz/PgskbyM9+F/A44850UWrhQ==} 99 - dev: true 100 - 101 - /@marais/tsconfig@0.0.4: 102 - resolution: {integrity: sha512-b6KCal22xP6E8wgl52rxdf8MXuffI4oJ9aTosucX4aVb97yl01wU0PzGF67oMA/i9KdzLa0rjQ0zVdZ+1pvVAg==} 103 - dev: true 104 - 105 - /acorn@8.9.0: 106 - resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==} 107 - engines: {node: '>=0.4.0'} 108 - hasBin: true 109 - dev: true 110 - 111 - /buffer-from@1.1.2: 112 - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} 113 - dev: true 114 - 115 - /bundt@2.0.0-next.5: 116 - resolution: {integrity: sha512-uoMMvvZUGRVyVbd0tls6ZU3bASc0lZt3b0iD3AE2J9sKgnsKJoWAWe4uUcCkla+Dx+T006ZERBvq0PY3iNuXlw==} 117 - engines: {node: '>=12'} 118 - hasBin: true 119 - dependencies: 120 - esbuild: 0.14.54 121 - rewrite-imports: 2.0.3 122 - terser: 5.18.1 123 - dev: true 124 - 125 - /commander@2.20.3: 126 - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} 127 - dev: true 128 - 129 - /dequal@2.0.3: 130 - resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} 131 - engines: {node: '>=6'} 132 - dev: true 133 - 134 - /diff@5.1.0: 135 - resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} 136 - engines: {node: '>=0.3.1'} 137 - dev: true 138 - 139 - /esbuild-android-64@0.14.54: 140 - resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==} 141 - engines: {node: '>=12'} 142 - cpu: [x64] 143 - os: [android] 144 - requiresBuild: true 145 - dev: true 146 - optional: true 147 - 148 - /esbuild-android-64@0.15.18: 149 - resolution: {integrity: sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==} 150 - engines: {node: '>=12'} 151 - cpu: [x64] 152 - os: [android] 153 - requiresBuild: true 154 - dev: true 155 - optional: true 156 - 157 - /esbuild-android-arm64@0.14.54: 158 - resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==} 159 - engines: {node: '>=12'} 160 - cpu: [arm64] 161 - os: [android] 162 - requiresBuild: true 163 - dev: true 164 - optional: true 165 - 166 - /esbuild-android-arm64@0.15.18: 167 - resolution: {integrity: sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==} 168 - engines: {node: '>=12'} 169 - cpu: [arm64] 170 - os: [android] 171 - requiresBuild: true 172 - dev: true 173 - optional: true 174 - 175 - /esbuild-darwin-64@0.14.54: 176 - resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==} 177 - engines: {node: '>=12'} 178 - cpu: [x64] 179 - os: [darwin] 180 - requiresBuild: true 181 - dev: true 182 - optional: true 183 - 184 - /esbuild-darwin-64@0.15.18: 185 - resolution: {integrity: sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==} 186 - engines: {node: '>=12'} 187 - cpu: [x64] 188 - os: [darwin] 189 - requiresBuild: true 190 - dev: true 191 - optional: true 192 - 193 - /esbuild-darwin-arm64@0.14.54: 194 - resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==} 195 - engines: {node: '>=12'} 196 - cpu: [arm64] 197 - os: [darwin] 198 - requiresBuild: true 199 - dev: true 200 - optional: true 201 - 202 - /esbuild-darwin-arm64@0.15.18: 203 - resolution: {integrity: sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==} 204 - engines: {node: '>=12'} 205 - cpu: [arm64] 206 - os: [darwin] 207 - requiresBuild: true 208 - dev: true 209 - optional: true 210 - 211 - /esbuild-freebsd-64@0.14.54: 212 - resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==} 213 - engines: {node: '>=12'} 214 - cpu: [x64] 215 - os: [freebsd] 216 - requiresBuild: true 217 - dev: true 218 - optional: true 219 - 220 - /esbuild-freebsd-64@0.15.18: 221 - resolution: {integrity: sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==} 222 - engines: {node: '>=12'} 223 - cpu: [x64] 224 - os: [freebsd] 225 - requiresBuild: true 226 - dev: true 227 - optional: true 228 - 229 - /esbuild-freebsd-arm64@0.14.54: 230 - resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==} 231 - engines: {node: '>=12'} 232 - cpu: [arm64] 233 - os: [freebsd] 234 - requiresBuild: true 235 - dev: true 236 - optional: true 237 - 238 - /esbuild-freebsd-arm64@0.15.18: 239 - resolution: {integrity: sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==} 240 - engines: {node: '>=12'} 241 - cpu: [arm64] 242 - os: [freebsd] 243 - requiresBuild: true 244 - dev: true 245 - optional: true 246 - 247 - /esbuild-linux-32@0.14.54: 248 - resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==} 249 - engines: {node: '>=12'} 250 - cpu: [ia32] 251 - os: [linux] 252 - requiresBuild: true 253 - dev: true 254 - optional: true 255 - 256 - /esbuild-linux-32@0.15.18: 257 - resolution: {integrity: sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==} 258 - engines: {node: '>=12'} 259 - cpu: [ia32] 260 - os: [linux] 261 - requiresBuild: true 262 - dev: true 263 - optional: true 264 - 265 - /esbuild-linux-64@0.14.54: 266 - resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==} 267 - engines: {node: '>=12'} 268 - cpu: [x64] 269 - os: [linux] 270 - requiresBuild: true 271 - dev: true 272 - optional: true 273 - 274 - /esbuild-linux-64@0.15.18: 275 - resolution: {integrity: sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==} 276 - engines: {node: '>=12'} 277 - cpu: [x64] 278 - os: [linux] 279 - requiresBuild: true 280 - dev: true 281 - optional: true 282 - 283 - /esbuild-linux-arm64@0.14.54: 284 - resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==} 285 - engines: {node: '>=12'} 286 - cpu: [arm64] 287 - os: [linux] 288 - requiresBuild: true 289 - dev: true 290 - optional: true 291 - 292 - /esbuild-linux-arm64@0.15.18: 293 - resolution: {integrity: sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==} 294 - engines: {node: '>=12'} 295 - cpu: [arm64] 296 - os: [linux] 297 - requiresBuild: true 298 - dev: true 299 - optional: true 300 - 301 - /esbuild-linux-arm@0.14.54: 302 - resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==} 303 - engines: {node: '>=12'} 304 - cpu: [arm] 305 - os: [linux] 306 - requiresBuild: true 307 - dev: true 308 - optional: true 309 - 310 - /esbuild-linux-arm@0.15.18: 311 - resolution: {integrity: sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==} 312 - engines: {node: '>=12'} 313 - cpu: [arm] 314 - os: [linux] 315 - requiresBuild: true 316 - dev: true 317 - optional: true 318 - 319 - /esbuild-linux-mips64le@0.14.54: 320 - resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==} 321 - engines: {node: '>=12'} 322 - cpu: [mips64el] 323 - os: [linux] 324 - requiresBuild: true 325 - dev: true 326 - optional: true 327 - 328 - /esbuild-linux-mips64le@0.15.18: 329 - resolution: {integrity: sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==} 330 - engines: {node: '>=12'} 331 - cpu: [mips64el] 332 - os: [linux] 333 - requiresBuild: true 334 - dev: true 335 - optional: true 336 - 337 - /esbuild-linux-ppc64le@0.14.54: 338 - resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==} 339 - engines: {node: '>=12'} 340 - cpu: [ppc64] 341 - os: [linux] 342 - requiresBuild: true 343 - dev: true 344 - optional: true 345 - 346 - /esbuild-linux-ppc64le@0.15.18: 347 - resolution: {integrity: sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==} 348 - engines: {node: '>=12'} 349 - cpu: [ppc64] 350 - os: [linux] 351 - requiresBuild: true 352 - dev: true 353 - optional: true 354 - 355 - /esbuild-linux-riscv64@0.14.54: 356 - resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==} 357 - engines: {node: '>=12'} 358 - cpu: [riscv64] 359 - os: [linux] 360 - requiresBuild: true 361 - dev: true 362 - optional: true 363 - 364 - /esbuild-linux-riscv64@0.15.18: 365 - resolution: {integrity: sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==} 366 - engines: {node: '>=12'} 367 - cpu: [riscv64] 368 - os: [linux] 369 - requiresBuild: true 370 - dev: true 371 - optional: true 372 - 373 - /esbuild-linux-s390x@0.14.54: 374 - resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==} 375 - engines: {node: '>=12'} 376 - cpu: [s390x] 377 - os: [linux] 378 - requiresBuild: true 379 - dev: true 380 - optional: true 381 - 382 - /esbuild-linux-s390x@0.15.18: 383 - resolution: {integrity: sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==} 384 - engines: {node: '>=12'} 385 - cpu: [s390x] 386 - os: [linux] 387 - requiresBuild: true 388 - dev: true 389 - optional: true 390 - 391 - /esbuild-netbsd-64@0.14.54: 392 - resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==} 393 - engines: {node: '>=12'} 394 - cpu: [x64] 395 - os: [netbsd] 396 - requiresBuild: true 397 - dev: true 398 - optional: true 399 - 400 - /esbuild-netbsd-64@0.15.18: 401 - resolution: {integrity: sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==} 402 - engines: {node: '>=12'} 403 - cpu: [x64] 404 - os: [netbsd] 405 - requiresBuild: true 406 - dev: true 407 - optional: true 408 - 409 - /esbuild-openbsd-64@0.14.54: 410 - resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==} 411 - engines: {node: '>=12'} 412 - cpu: [x64] 413 - os: [openbsd] 414 - requiresBuild: true 415 - dev: true 416 - optional: true 417 - 418 - /esbuild-openbsd-64@0.15.18: 419 - resolution: {integrity: sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==} 420 - engines: {node: '>=12'} 421 - cpu: [x64] 422 - os: [openbsd] 423 - requiresBuild: true 424 - dev: true 425 - optional: true 426 - 427 - /esbuild-sunos-64@0.14.54: 428 - resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==} 429 - engines: {node: '>=12'} 430 - cpu: [x64] 431 - os: [sunos] 432 - requiresBuild: true 433 - dev: true 434 - optional: true 435 - 436 - /esbuild-sunos-64@0.15.18: 437 - resolution: {integrity: sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==} 438 - engines: {node: '>=12'} 439 - cpu: [x64] 440 - os: [sunos] 441 - requiresBuild: true 442 - dev: true 443 - optional: true 444 - 445 - /esbuild-windows-32@0.14.54: 446 - resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==} 447 - engines: {node: '>=12'} 448 - cpu: [ia32] 449 - os: [win32] 450 - requiresBuild: true 451 - dev: true 452 - optional: true 453 - 454 - /esbuild-windows-32@0.15.18: 455 - resolution: {integrity: sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==} 456 - engines: {node: '>=12'} 457 - cpu: [ia32] 458 - os: [win32] 459 - requiresBuild: true 460 - dev: true 461 - optional: true 462 - 463 - /esbuild-windows-64@0.14.54: 464 - resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==} 465 - engines: {node: '>=12'} 466 - cpu: [x64] 467 - os: [win32] 468 - requiresBuild: true 469 - dev: true 470 - optional: true 471 - 472 - /esbuild-windows-64@0.15.18: 473 - resolution: {integrity: sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==} 474 - engines: {node: '>=12'} 475 - cpu: [x64] 476 - os: [win32] 477 - requiresBuild: true 478 - dev: true 479 - optional: true 480 - 481 - /esbuild-windows-arm64@0.14.54: 482 - resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==} 483 - engines: {node: '>=12'} 484 - cpu: [arm64] 485 - os: [win32] 486 - requiresBuild: true 487 - dev: true 488 - optional: true 489 - 490 - /esbuild-windows-arm64@0.15.18: 491 - resolution: {integrity: sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==} 492 - engines: {node: '>=12'} 493 - cpu: [arm64] 494 - os: [win32] 495 - requiresBuild: true 496 - dev: true 497 - optional: true 498 - 499 - /esbuild@0.14.54: 500 - resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==} 501 - engines: {node: '>=12'} 502 - hasBin: true 503 - requiresBuild: true 504 - optionalDependencies: 505 - '@esbuild/linux-loong64': 0.14.54 506 - esbuild-android-64: 0.14.54 507 - esbuild-android-arm64: 0.14.54 508 - esbuild-darwin-64: 0.14.54 509 - esbuild-darwin-arm64: 0.14.54 510 - esbuild-freebsd-64: 0.14.54 511 - esbuild-freebsd-arm64: 0.14.54 512 - esbuild-linux-32: 0.14.54 513 - esbuild-linux-64: 0.14.54 514 - esbuild-linux-arm: 0.14.54 515 - esbuild-linux-arm64: 0.14.54 516 - esbuild-linux-mips64le: 0.14.54 517 - esbuild-linux-ppc64le: 0.14.54 518 - esbuild-linux-riscv64: 0.14.54 519 - esbuild-linux-s390x: 0.14.54 520 - esbuild-netbsd-64: 0.14.54 521 - esbuild-openbsd-64: 0.14.54 522 - esbuild-sunos-64: 0.14.54 523 - esbuild-windows-32: 0.14.54 524 - esbuild-windows-64: 0.14.54 525 - esbuild-windows-arm64: 0.14.54 526 - dev: true 527 - 528 - /esbuild@0.15.18: 529 - resolution: {integrity: sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==} 530 - engines: {node: '>=12'} 531 - hasBin: true 532 - requiresBuild: true 533 - optionalDependencies: 534 - '@esbuild/android-arm': 0.15.18 535 - '@esbuild/linux-loong64': 0.15.18 536 - esbuild-android-64: 0.15.18 537 - esbuild-android-arm64: 0.15.18 538 - esbuild-darwin-64: 0.15.18 539 - esbuild-darwin-arm64: 0.15.18 540 - esbuild-freebsd-64: 0.15.18 541 - esbuild-freebsd-arm64: 0.15.18 542 - esbuild-linux-32: 0.15.18 543 - esbuild-linux-64: 0.15.18 544 - esbuild-linux-arm: 0.15.18 545 - esbuild-linux-arm64: 0.15.18 546 - esbuild-linux-mips64le: 0.15.18 547 - esbuild-linux-ppc64le: 0.15.18 548 - esbuild-linux-riscv64: 0.15.18 549 - esbuild-linux-s390x: 0.15.18 550 - esbuild-netbsd-64: 0.15.18 551 - esbuild-openbsd-64: 0.15.18 552 - esbuild-sunos-64: 0.15.18 553 - esbuild-windows-32: 0.15.18 554 - esbuild-windows-64: 0.15.18 555 - esbuild-windows-arm64: 0.15.18 556 - dev: true 557 - 558 - /kleur@4.1.5: 559 - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} 560 - engines: {node: '>=6'} 561 - dev: true 562 - 563 - /mri@1.2.0: 564 - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} 565 - engines: {node: '>=4'} 566 - dev: true 567 - 568 - /rewrite-imports@2.0.3: 569 - resolution: {integrity: sha512-R7ICJEeP3y+d/q4C8YEJj9nRP0JyiSqG07uc0oQh8JvAe706dDFVL95GBZYCjADqmhArZWWjfM/5EcmVu4/B+g==} 570 - engines: {node: '>=6'} 571 - dev: true 572 - 573 - /sade@1.8.1: 574 - resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} 575 - engines: {node: '>=6'} 576 - dependencies: 577 - mri: 1.2.0 578 - dev: true 579 - 580 - /source-map-support@0.5.21: 581 - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} 582 - dependencies: 583 - buffer-from: 1.1.2 584 - source-map: 0.6.1 585 - dev: true 586 - 587 - /source-map@0.6.1: 588 - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} 589 - engines: {node: '>=0.10.0'} 590 - dev: true 591 - 592 - /terser@5.18.1: 593 - resolution: {integrity: sha512-j1n0Ao919h/Ai5r43VAnfV/7azUYW43GPxK7qSATzrsERfW7+y2QW9Cp9ufnRF5CQUWbnLSo7UJokSWCqg4tsQ==} 594 - engines: {node: '>=10'} 595 - hasBin: true 596 - dependencies: 597 - '@jridgewell/source-map': 0.3.3 598 - acorn: 8.9.0 599 - commander: 2.20.3 600 - source-map-support: 0.5.21 601 - dev: true 602 - 603 - /tsm@2.3.0: 604 - resolution: {integrity: sha512-++0HFnmmR+gMpDtKTnW3XJ4yv9kVGi20n+NfyQWB9qwJvTaIWY9kBmzek2YUQK5APTQ/1DTrXmm4QtFPmW9Rzw==} 605 - engines: {node: '>=12'} 606 - hasBin: true 607 - dependencies: 608 - esbuild: 0.15.18 609 - dev: true 610 - 611 - /typescript@5.1.3: 612 - resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} 613 - engines: {node: '>=14.17'} 614 - hasBin: true 615 - dev: true 616 - 617 - /uvu@0.5.4: 618 - resolution: {integrity: sha512-x1CyUjcP9VKaNPhjeB3FIc/jqgLsz2Q9LFhRzUTu/jnaaHILEGNuE0XckQonl8ISLcwyk9I2EZvWlYsQnwxqvQ==} 619 - engines: {node: '>=8'} 620 - hasBin: true 621 - dependencies: 622 - dequal: 2.0.3 623 - diff: 5.1.0 624 - kleur: 4.1.5 625 - sade: 1.8.1 626 - dev: true
+17 -25
readme.md
··· 2 2 3 3 <samp> 4 4 5 - # object-identity 5 + # object-identity [![licenses](https://licenses.dev/b/npm/object-identity?style=dark)](https://licenses.dev/npm/object-identity) 6 6 7 7 </samp> 8 8 9 9 **A utility that provides a stable identity of an object** 10 10 11 - <a href="https://npm-stat.com/charts.html?package=object-identity"> 12 - <img src="https://badgen.net/npm/dm/object-identity?color=black&label=npm%20downloads" alt="js downloads"> 13 - </a> 14 - <a href="https://licenses.dev/npm/object-identity"> 15 - <img src="https://licenses.dev/b/npm/object-identity?style=dark" alt="licenses" /> 16 - </a> 17 - <a href="https://unpkg.com/object-identity/index.mjs"> 18 - <img src="https://img.badgesize.io/https://unpkg.com/object-identity/index.mjs?compression=gzip&label=gzip&color=black" alt="gzip size" /> 19 - </a> 20 - <a href="https://unpkg.com/object-identity/index.mjs"> 21 - <img src="https://img.badgesize.io/https://unpkg.com/object-identity/index.mjs?compression=brotli&label=brotli&color=black" alt="brotli size" /> 22 - </a> 23 - 24 - <br> 25 - <br> 26 - 27 11 <sup> 28 12 29 - This is free to use software, but if you do like it, consisder supporting me ❤️ 13 + This is free to use software, but if you do like it, consider supporting me ❤️ 30 14 31 15 [![sponsor me](https://badgen.net/badge/icon/sponsor?icon=github&label&color=gray)](https://github.com/sponsors/maraisr) 32 16 [![buy me a coffee](https://badgen.net/badge/icon/buymeacoffee?icon=buymeacoffee&label&color=gray)](https://www.buymeacoffee.com/marais) ··· 40 24 - ✅ **Intuitive** 41 25 - 🌪 **Recursive/Circular support** 42 26 - 🏎 **Performant** — check the [benchmarks](#-benchmark). 43 - - 🪶 **Lightweight** — a mere 387B and no [dependencies](https://npm.anvaka.com/#/view/2d/object-identity/). 27 + - 🪶 **Lightweight** — a mere 387B and no 28 + [dependencies](https://npm.anvaka.com/#/view/2d/object-identity/). 44 29 45 30 ## 🚀 Usage 31 + 32 + > Avaliable on [jsr](https://jsr.io/@mr/object-identity), 33 + > [NPM](https://npmjs.com/package/object-identity) and 34 + > [deno.land](https://deno.land/x/object_identity) 46 35 47 36 ```ts 48 37 import { identify } from 'object-identity'; 38 + // or 39 + import { identify } from 'https://deno.land/x/object_identity'; 49 40 50 41 // ~> identity the object 51 42 const id1 = identify({ a: new Set(['b', 'c', new Map([['d', 'e']])]) }); ··· 58 49 59 50 ## 💨 Benchmark 60 51 61 - > via the [`/bench`](/bench) directory with Node v18.16.1 (Apple M1 Pro) 52 + > via the [`/bench`](/bench) directory with deno 1.41.3 62 53 63 54 ``` 64 - ✔ object-identity ~ 55,252,648 ops/sec ± 0.11% 65 - ✔ object-hash ~ 96,936 ops/sec ± 0.01% 66 - ✔ json-stable-stringify ~ 605,425 ops/sec ± 0.02% 55 + ✔ object-identity ~ 14,646,170 ops/sec ± 0.10% 56 + ✔ object-hash ~ 144,060 ops/sec ± 0.01% 57 + ✔ json-stable-stringify ~ 638,559 ops/sec ± 0.01% 67 58 ``` 68 59 69 - > ^ `object-identity` is not as feature-full it's alternatives, specifically around `function` values and other node 70 - > builtins. So take this benchmark with a grain of salt, as it's only testing "json-like" payloads. 60 + > ^ `object-identity` is not as feature-full it's alternatives, specifically around `function` 61 + > values and other node builtins. So take this benchmark with a grain of salt, as it's only testing 62 + > "json-like" payloads. 71 63 72 64 ## License 73 65
+55
scripts/build.ts
··· 1 + import { build, emptyDir } from '@deno/dnt'; 2 + 3 + await emptyDir('./npm'); 4 + 5 + await build({ 6 + entryPoints: ['./mod.ts'], 7 + outDir: './npm', 8 + shims: { 9 + deno: 'dev', 10 + }, 11 + 12 + declaration: 'inline', 13 + declarationMap: false, 14 + scriptModule: 'cjs', 15 + typeCheck: 'both', 16 + test: true, 17 + 18 + importMap: 'deno.json', 19 + 20 + package: { 21 + name: 'object-identity', 22 + version: Deno.args[0], 23 + repository: 'maraisr/object-identity', 24 + license: 'MIT', 25 + author: { 26 + name: 'Marais Rososuw', 27 + email: 'me@marais.dev', 28 + url: 'https://marais.io', 29 + }, 30 + keywords: [ 31 + 'object', 32 + 'identity', 33 + 'hash', 34 + 'fingerprint', 35 + ], 36 + }, 37 + 38 + compilerOptions: { 39 + target: 'ES2022', 40 + lib: ['ES2022', 'WebWorker'], 41 + }, 42 + 43 + filterDiagnostic(diag) { 44 + let txt = diag.messageText.toString(); 45 + return !txt.includes( 46 + // ignore type error for missing Deno built-in information 47 + `Type 'ReadableStream<string>' must have a '[Symbol.asyncIterator]()' method that returns an async iterator`, 48 + ); 49 + }, 50 + 51 + async postBuild() { 52 + await Deno.copyFile('license', 'npm/license'); 53 + await Deno.copyFile('readme.md', 'npm/readme.md'); 54 + }, 55 + });
-1
src/index.d.ts
··· 1 - export function identify<T>(input: T): string;
-286
src/index.test.ts
··· 1 - import { suite } from 'uvu'; 2 - import * as assert from 'uvu/assert'; 3 - import { identify } from '../src'; 4 - 5 - // ~ API 6 - 7 - const API = suite('exports'); 8 - 9 - API('should export a function', () => { 10 - assert.type(identify, 'function'); 11 - }); 12 - 13 - // ~ Arrays 14 - 15 - const Arrays = suite('array'); 16 - 17 - Arrays('flat', () => { 18 - assert.equal(identify([1, 2, 3]), identify([1, 2, 3])); 19 - }); 20 - 21 - Arrays('order should matter', () => { 22 - assert.not.equal(identify([3, 2, 1]), identify([1, 2, 3])); 23 - }); 24 - 25 - Arrays('nested', () => { 26 - assert.equal( 27 - identify([ 28 - [3, 2, 1], 29 - [1, 2, 3], 30 - ]), 31 - identify([ 32 - [3, 2, 1], 33 - [1, 2, 3], 34 - ]), 35 - ); 36 - }); 37 - 38 - Arrays('circular', () => { 39 - const arr = [1, 2, 3]; 40 - // @ts-ignore 41 - arr.push(arr); 42 - assert.not.throws(() => identify(arr), /Maximum call stack size exceeded/); 43 - assert.equal(identify(arr), identify(arr)); 44 - }); 45 - 46 - Arrays('circular should know its circular', () => { 47 - const arr = [1, 2, 3]; 48 - // @ts-ignore 49 - arr.push(arr); 50 - assert.equal(identify(arr), 'a123~1'); 51 - }); 52 - 53 - // ~ Objects 54 - 55 - const Objects = suite('object'); 56 - 57 - Objects('basic', () => { 58 - assert.equal(identify({ foo: 'bar' }), identify({ foo: 'bar' })); 59 - }); 60 - 61 - Objects('key ordering', () => { 62 - assert.equal( 63 - identify({ one: 'one', two: 'two' }), 64 - identify({ two: 'two', one: 'one' }), 65 - ); 66 - }); 67 - 68 - Objects('complex keys', () => { 69 - const d = Date.now(); 70 - assert.equal( 71 - identify({ [123]: 'one', [d]: 'two' }), 72 - identify({ 73 - [123]: 'one', 74 - [d]: 'two', 75 - }), 76 - ); 77 - }); 78 - 79 - Objects('nested', () => { 80 - assert.equal( 81 - identify({ a: { b: 'c' }, d: { e: { f: 'g' } } }), 82 - identify({ 83 - d: { e: { f: 'g' } }, 84 - a: { b: 'c' }, 85 - }), 86 - ); 87 - }); 88 - 89 - Objects('circular', () => { 90 - const o = { a: 'b' }; 91 - // @ts-ignore 92 - o['c'] = o; 93 - assert.not.throws(() => identify(o), /Maximum call stack size exceeded/); 94 - assert.equal(identify(o), identify(o)); 95 - }); 96 - 97 - Objects('partial circular', () => { 98 - const o = { v: 1 }; 99 - const a = ['a', o]; 100 - assert.equal(identify(a), identify(a)); 101 - }); 102 - 103 - // Right now they do match, because the o1 lookup is the same as o2 104 - // as the reference is still the same, so the weakmap is the same 105 - Objects.skip('with samey circular shoudlnt match', () => { 106 - const o1: any = { a: 1, b: 2 }; 107 - const o2: any = { a: 1, b: 2 }; 108 - o1['c'] = o1; 109 - o1['d'] = o2; 110 - 111 - o2['c'] = o2; // 👈 #1 112 - 113 - const a = identify(o1); 114 - 115 - o2['c'] = o1; // 👈 different from #1 116 - 117 - const b = identify(o1); 118 - 119 - assert.not.equal(a, b, `${a} != ${b}`); 120 - }); 121 - 122 - Objects('same values between types shouldnt match', () => { 123 - assert.not.equal(identify({ a: 'b' }), identify(['a', 'b'])); 124 - }); 125 - 126 - Objects('same hash for Map or Object', () => { 127 - assert.equal(identify({ a: 'b' }), identify(new Map([['a', 'b']]))); 128 - }); 129 - 130 - // ~ Sets 131 - 132 - const Sets = suite('set'); 133 - 134 - Sets('shouldnt be ordered', () => { 135 - assert.not.equal( 136 - identify(new Set([1, 2, 3])), 137 - identify(new Set([3, 2, 1])), 138 - ); 139 - }); 140 - 141 - Sets('shouldnt be ordered', () => { 142 - assert.not.equal( 143 - identify(new Set([{ a: 'a' }, { b: 'b' }])), 144 - identify(new Set([{ b: 'b' }, { a: 'a' }])), 145 - ); 146 - }); 147 - 148 - Sets('circular', () => { 149 - const s = new Set([1, 2, 3]); 150 - // @ts-ignore 151 - s.add(s); 152 - assert.not.throws(() => identify(s), /Maximum call stack size exceeded/); 153 - assert.equal(identify(s), identify(s)); 154 - }); 155 - 156 - // ~ Maps 157 - 158 - const Maps = suite('map'); 159 - 160 - Maps('basic', () => { 161 - assert.equal( 162 - identify( 163 - new Map([ 164 - ['a', 'b'], 165 - ['c', 'd'], 166 - ]), 167 - ), 168 - identify( 169 - new Map([ 170 - ['c', 'd'], 171 - ['a', 'b'], 172 - ]), 173 - ), 174 - ); 175 - }); 176 - 177 - Maps('circular', () => { 178 - const m = new Map([ 179 - ['a', 'b'], 180 - ['c', 'd'], 181 - ]); 182 - // @ts-ignore 183 - m.set('e', m); 184 - assert.not.throws(() => identify(m), /Maximum call stack size exceeded/); 185 - assert.equal(identify(m), identify(m)); 186 - }); 187 - 188 - // ~ Values 189 - 190 - const Values = suite('values'); 191 - 192 - Values('primitives', () => { 193 - const t = (v: any) => 194 - assert.equal( 195 - identify(v), 196 - identify(v), 197 - `Value ${v} should have hashed correctly.`, 198 - ); 199 - 200 - t('test'); 201 - t(new Date()); 202 - t(NaN); 203 - t(true); 204 - t(false); 205 - t(/test/); 206 - t(123); 207 - t(null); 208 - t(undefined); 209 - // TODO: Solve for symbols 210 - // t(Symbol()); 211 - // t(Symbol("test")); 212 - }); 213 - 214 - Values('circular ref should be consistent', () => { 215 - let o: any = { a: 1, c: 2 }; 216 - o.b = o; 217 - o.d = new Map(); // the map is seen 2nd 218 - o.d.set('x', o.d); 219 - 220 - assert.equal(Object.keys(o), ['a', 'c', 'b', 'd']); 221 - 222 - const a = identify(o); 223 - 224 - o = { a: 1 }; 225 - o.d = new Map(); // the map is seen first 226 - o.d.set('x', o.d); 227 - o.b = o; 228 - o.c = 2; 229 - 230 - assert.equal(Object.keys(o), ['a', 'd', 'b', 'c']); 231 - 232 - const b = identify(o); 233 - 234 - // the circular ref should be the same 235 - assert.equal(a, b, `${a} === ${b}`); 236 - }); 237 - 238 - Values('circular deeply nested objects should equal', () => { 239 - const o1: any = { 240 - b: { 241 - c: 123, 242 - }, 243 - }; 244 - 245 - o1.b.d = o1; 246 - o1.x = [9, o1.b]; 247 - 248 - const o2: any = { 249 - b: { 250 - c: 123, 251 - }, 252 - }; 253 - 254 - o2.b.d = o2; 255 - o2.x = [9, o2.b]; 256 - const a = identify(o1); 257 - const b = identify(o2); 258 - assert.equal(a, b, `${a} === ${b}`); 259 - }); 260 - 261 - Values('all elements visited', () => { 262 - const c = [1]; 263 - // @ts-ignore 264 - c.push(c); 265 - const hash = identify({ 266 - a: { b: ['c', new Set(['d', new Map([['e', 'f']]), c, 'g'])] }, 267 - }); 268 - assert.equal(hash, 'oaobacadoefa1~5g'); 269 - }); 270 - 271 - Values('should only be seen once', () => { 272 - const hash = identify({ 273 - a: [[1], [2], [3]], 274 - b: new Set([new Set([1]), new Set([2]), new Set([3])]), 275 - }); 276 - assert.not.match(hash, /~\d+/); 277 - }); 278 - 279 - // -- 280 - 281 - API.run(); 282 - Arrays.run(); 283 - Objects.run(); 284 - Sets.run(); 285 - Maps.run(); 286 - Values.run();
+15 -2
src/index.ts mod.ts
··· 10 10 if ( 11 11 !(type === '[object RegExp]' || type === '[object Date]') && 12 12 seen.has(input) 13 - ) 13 + ) { 14 14 return seen.get(input)!; 15 + } 15 16 seen.set(input, '~' + ++ref_index); 16 17 17 18 switch (type) { 18 19 case '[object Set]': 19 - tmp = Array.from(input); 20 + tmp = Array.from(input as Set<unknown>); 20 21 case '[object Array]': 21 22 { 22 23 tmp ||= input; ··· 63 64 return out; 64 65 } 65 66 67 + /** 68 + * Creates a shape equivalent identifier for an input object. 69 + * This is useful for comparing objects, where keys could be provided in any order. 70 + * 71 + * @example 72 + * ```ts 73 + * const obj = { a: 1, b: 2 }; 74 + * const obj2 = { b: 2, a: 1 }; 75 + * 76 + * console.log(identify(obj) === identify(obj2)); // true 77 + * ``` 78 + */ 66 79 export function identify<T>(input: T): string { 67 80 return walk(input, 0); 68 81 }
-9
src/index.types.ts
··· 1 - import { identify } from 'object-identity'; 2 - 3 - declare function assert<T>(thing: T): void; 4 - 5 - assert<string>(identify('string')); 6 - assert<string>(identify(1)); 7 - assert<string>(identify([])); 8 - assert<string>(identify({})); 9 - assert<string>(identify(new Error()));
-11
tsconfig.json
··· 1 - { 2 - "extends": "@marais/tsconfig", 3 - "compilerOptions": { 4 - "baseUrl": ".", 5 - "paths": { 6 - "object-identity": ["src/index.d.ts"] 7 - } 8 - }, 9 - "include": ["src", "test"], 10 - "exclude": ["node_modules"] 11 - }