Skip to content

Commit 392cd84

Browse files
authored
Merge pull request #17 from SukkaW/named-exports
2 parents b06d531 + 97ff5a1 commit 392cd84

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"build:mjs": "esbuild src/index.ts --minify --target=es6 --outdir=dist --out-extension:.js=.mjs",
2121
"build:cjs": "esbuild src/index.ts --minify --target=es6 --outdir=dist --format=cjs",
2222
"build:types": "tsc --emitDeclarationOnly --declaration -p tsconfig.build.json",
23-
"build": "yarn build:mjs && yarn build:cjs && yarn build:types",
23+
"build": "pnpm build:mjs && pnpm build:cjs && pnpm build:types",
2424
"test": "jest"
2525
},
2626
"devDependencies": {

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let counter = 0
1414
//
1515
// This is not a serialization function, and the result is not guaranteed to be
1616
// parsable.
17-
export default function stableHash(arg: any): string {
17+
export function stableHash(arg: any): string {
1818
const type = typeof arg
1919
const constructor = arg && arg.constructor
2020
const isDate = constructor == Date
@@ -55,3 +55,5 @@ export default function stableHash(arg: any): string {
5555
if (type == "symbol") return arg.toString()
5656
return type == "string" ? JSON.stringify(arg) : "" + arg
5757
}
58+
59+
export default stableHash

0 commit comments

Comments
 (0)