🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

@arcjet/stable-hash

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcjet/stable-hash - npm Package Compare versions

Comparing version
1.1.0
to
1.2.0
+1
-1
edge-light.js
import { makeHasher } from './hasher.js';
export { bool, string, stringSliceOrdered, uint32 } from './hasher.js';
export { bool, float64, string, stringSliceOrdered, uint32 } from './hasher.js';

@@ -4,0 +4,0 @@ const hash = makeHasher(crypto.subtle);

@@ -56,2 +56,13 @@ /**

/**
* Create a hasher for a 64-bit floating point number.
*
* @param key
* Key.
* @param value
* Value.
* @returns
* Hasher.
*/
export declare function float64(key: string, value: number): FieldHasher;
/**
* Create a hasher for an array of strings.

@@ -58,0 +69,0 @@ *

@@ -87,2 +87,19 @@ class Sha256 {

/**
* Create a hasher for a 64-bit floating point number.
*
* @param key
* Key.
* @param value
* Value.
* @returns
* Hasher.
*/
function float64(key, value) {
return (data) => {
data.writeString(key);
data.writeString(fieldSeparator);
data.writeString(value.toString());
};
}
/**
* Create a hasher for an array of strings.

@@ -186,2 +203,2 @@ *

export { bool, makeHasher, string, stringSliceOrdered, uint32 };
export { bool, float64, makeHasher, string, stringSliceOrdered, uint32 };
import * as crypto from 'node:crypto';
import { makeHasher } from './hasher.js';
export { bool, string, stringSliceOrdered, uint32 } from './hasher.js';
export { bool, float64, string, stringSliceOrdered, uint32 } from './hasher.js';

@@ -5,0 +5,0 @@ const hash = makeHasher(crypto.subtle);

{
"name": "@arcjet/stable-hash",
"version": "1.1.0",
"version": "1.2.0",
"description": "Arcjet stable hashing utility",

@@ -57,6 +57,6 @@ "keywords": [

"devDependencies": {
"@arcjet/eslint-config": "1.1.0",
"@arcjet/rollup-config": "1.1.0",
"@rollup/wasm-node": "4.57.0",
"@types/node": "25.1.0",
"@arcjet/eslint-config": "1.2.0",
"@arcjet/rollup-config": "1.2.0",
"@rollup/wasm-node": "4.57.1",
"@types/node": "24.11.0",
"eslint": "9.39.2",

@@ -63,0 +63,0 @@ "typescript": "5.9.3"

import { makeHasher } from './hasher.js';
export { bool, string, stringSliceOrdered, uint32 } from './hasher.js';
export { bool, float64, string, stringSliceOrdered, uint32 } from './hasher.js';

@@ -4,0 +4,0 @@ const hash = makeHasher(crypto.subtle);