stable-hash-x
Advanced tools
Comparing version
@@ -6,3 +6,3 @@ //#region src/index.ts | ||
const type = typeof arg; | ||
const constructor = arg?.constructor; | ||
const constructor = arg === null || arg === void 0 ? void 0 : arg.constructor; | ||
const isDate = constructor === Date; | ||
@@ -9,0 +9,0 @@ if (Object(arg) === arg && !isDate && constructor != RegExp) { |
{ | ||
"name": "stable-hash-x", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"type": "module", | ||
@@ -13,2 +13,5 @@ "description": "Stable JS value hash.", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=12.0.0" | ||
}, | ||
"main": "./lib/index.cjs", | ||
@@ -15,0 +18,0 @@ "types": "./lib/index.d.cts", |
@@ -16,3 +16,3 @@ # stable-hash-x | ||
A tiny and fast (450b <sup>[unpkg](https://unpkg.com/stable-hash-x@latest/lib/index.js)</sup>) lib for "stably hashing" a JavaScript value. Originally created for [SWR](https://github.com/vercel/swr) by [Shu Ding][] at [`stable-hash`](https://github.com/shuding/stable-hash), we forked it because the original one is a bit out of maintenance for a long time. | ||
A tiny and fast (460b <sup>[unpkg](https://unpkg.com/stable-hash-x@latest/lib/index.js)</sup>) lib for "stably hashing" a JavaScript value. Originally created for [SWR](https://github.com/vercel/swr) by [Shu Ding][] at [`stable-hash`](https://github.com/shuding/stable-hash), we forked it because the original one is a bit out of maintenance for a long time. | ||
@@ -200,3 +200,3 @@ It's similar to `JSON.stringify(value)`, but: | ||
import hash from 'stable-hash-x' | ||
import { hash } from 'stable-hash-x' | ||
@@ -203,0 +203,0 @@ const weakHash = hash(anyJavaScriptValueHere) |
Sorry, the diff of this file is not supported yet
14768
0.88%