stable-hash
Advanced tools
Comparing version
@@ -1,1 +0,2 @@ | ||
export default function stableHash(arg: any): string; | ||
export declare function stableHash(arg: any): string; | ||
export default stableHash; |
@@ -1,1 +0,1 @@ | ||
var u=Object.defineProperty;var r=t=>u(t,"__esModule",{value:!0});var y=(t,i)=>{r(t);for(var s in i)u(t,s,{get:i[s],enumerable:!0})};y(exports,{default:()=>c});const o=new WeakMap;let b=0;function c(t){const i=typeof t,s=t&&t.constructor,f=s==Date;if(Object(t)===t&&!f&&s!=RegExp){let e=o.get(t);if(e)return e;e=++b+"~",o.set(t,e);let n;if(s==Array){for(e="@",n=0;n<t.length;n++)e+=c(t[n])+",";o.set(t,e)}else if(s==Object){e="#";const l=Object.keys(t).sort();for(;(n=l.pop())!==void 0;)t[n]!==void 0&&(e+=n+":"+c(t[n])+",");o.set(t,e)}return e}return f?t.toJSON():i=="symbol"?t.toString():i=="string"?JSON.stringify(t):""+t} | ||
var u=Object.defineProperty;var r=t=>u(t,"__esModule",{value:!0});var y=(t,o)=>{r(t);for(var s in o)u(t,s,{get:o[s],enumerable:!0})};y(exports,{default:()=>b,stableHash:()=>c});const i=new WeakMap;let p=0;function c(t){const o=typeof t,s=t&&t.constructor,f=s==Date;if(Object(t)===t&&!f&&s!=RegExp){let e=i.get(t);if(e)return e;e=++p+"~",i.set(t,e);let n;if(s==Array){for(e="@",n=0;n<t.length;n++)e+=c(t[n])+",";i.set(t,e)}else if(s==Object){e="#";const l=Object.keys(t).sort();for(;(n=l.pop())!==void 0;)t[n]!==void 0&&(e+=n+":"+c(t[n])+",");i.set(t,e)}return e}return f?t.toJSON():o=="symbol"?t.toString():o=="string"?JSON.stringify(t):""+t}var b=c; |
{ | ||
"name": "stable-hash", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Stable JS value hash.", | ||
@@ -8,2 +8,3 @@ "repository": "https://github.com/shuding/stable-hash", | ||
"license": "MIT", | ||
"packageManager": "pnpm@9.15.0", | ||
"main": "./dist/index.js", | ||
@@ -20,2 +21,9 @@ "module": "./dist/index.mjs", | ||
], | ||
"scripts": { | ||
"build:mjs": "esbuild src/index.ts --minify --target=es6 --outdir=dist --out-extension:.js=.mjs", | ||
"build:cjs": "esbuild src/index.ts --minify --target=es6 --outdir=dist --format=cjs", | ||
"build:types": "tsc --emitDeclarationOnly --declaration -p tsconfig.build.json", | ||
"build": "pnpm build:mjs && pnpm build:cjs && pnpm build:types", | ||
"test": "jest" | ||
}, | ||
"devDependencies": { | ||
@@ -36,10 +44,3 @@ "@types/jest": "^28.1.3", | ||
"semi": false | ||
}, | ||
"scripts": { | ||
"build:mjs": "esbuild src/index.ts --minify --target=es6 --outdir=dist --out-extension:.js=.mjs", | ||
"build:cjs": "esbuild src/index.ts --minify --target=es6 --outdir=dist --format=cjs", | ||
"build:types": "tsc --emitDeclarationOnly --declaration -p tsconfig.build.json", | ||
"build": "yarn build:mjs && yarn build:cjs && yarn build:types", | ||
"test": "jest" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
5596
2.43%7
16.67%