You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

stable-hash-x

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stable-hash-x - npm Package Compare versions

Comparing version

to
0.1.1

2

lib/index.js

@@ -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