Socket
Socket
Sign inDemoInstall

@xyo-network/hash

Package Overview
Dependencies
Maintainers
7
Versions
419
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xyo-network/hash - npm Package Compare versions

Comparing version 2.77.14 to 2.77.15

8

dist/browser/index.js

@@ -113,2 +113,6 @@ // src/PayloadHasher.ts

}
/** @function jsonPayload Returns a clone of the payload that is JSON safe */
static jsonPayload(payload, meta = false) {
return sortFields(removeEmptyFields(meta ? payload : deepOmitUnderscoreFields(payload)));
}
static stringifyHashFields(obj) {

@@ -128,2 +132,6 @@ return JSON.stringify(this.hashFields(obj));

}
/** @function jsonPayload Returns a clone of the payload that is JSON safe */
jsonPayload(meta = false) {
return _PayloadHasher.jsonPayload(this.obj, meta);
}
};

@@ -130,0 +138,0 @@ export {

@@ -16,2 +16,8 @@ import { AnyObject, ObjectWrapper } from '@xyo-network/object';

static hashes<T extends AnyObject>(objs: T[]): Promise<Hash[]>;
/** @function jsonPayload Returns a clone of the payload that is JSON safe */
static jsonPayload<T extends AnyObject>(
/** @param payload The payload to process */
payload: T,
/** @param meta Keeps underscore (meta) fields if set to true */
meta?: boolean): T;
static stringifyHashFields<T extends AnyObject>(obj: T): string;

@@ -21,3 +27,7 @@ static toMap<T extends AnyObject>(objs: T[]): Promise<Record<Hash, T>>;

hashSync(): Hash;
/** @function jsonPayload Returns a clone of the payload that is JSON safe */
jsonPayload(
/** @param meta Keeps underscore (meta) fields if set to true */
meta?: boolean): T;
}
//# sourceMappingURL=PayloadHasher.d.ts.map

@@ -157,2 +157,6 @@ "use strict";

}
/** @function jsonPayload Returns a clone of the payload that is JSON safe */
static jsonPayload(payload, meta = false) {
return sortFields(removeEmptyFields(meta ? payload : deepOmitUnderscoreFields(payload)));
}
static stringifyHashFields(obj) {

@@ -172,2 +176,6 @@ return JSON.stringify(this.hashFields(obj));

}
/** @function jsonPayload Returns a clone of the payload that is JSON safe */
jsonPayload(meta = false) {
return _PayloadHasher.jsonPayload(this.obj, meta);
}
};

@@ -174,0 +182,0 @@ // Annotate the CommonJS export names for ESM import in node:

@@ -16,2 +16,8 @@ import { AnyObject, ObjectWrapper } from '@xyo-network/object';

static hashes<T extends AnyObject>(objs: T[]): Promise<Hash[]>;
/** @function jsonPayload Returns a clone of the payload that is JSON safe */
static jsonPayload<T extends AnyObject>(
/** @param payload The payload to process */
payload: T,
/** @param meta Keeps underscore (meta) fields if set to true */
meta?: boolean): T;
static stringifyHashFields<T extends AnyObject>(obj: T): string;

@@ -21,3 +27,7 @@ static toMap<T extends AnyObject>(objs: T[]): Promise<Record<Hash, T>>;

hashSync(): Hash;
/** @function jsonPayload Returns a clone of the payload that is JSON safe */
jsonPayload(
/** @param meta Keeps underscore (meta) fields if set to true */
meta?: boolean): T;
}
//# sourceMappingURL=PayloadHasher.d.ts.map

8

package.json

@@ -17,5 +17,5 @@ {

"@xylabs/platform": "^2.13.3",
"@xyo-network/object": "~2.77.14",
"@xyo-network/typeof": "~2.77.14",
"@xyo-network/wasm": "~2.77.14",
"@xyo-network/object": "~2.77.15",
"@xyo-network/typeof": "~2.77.15",
"@xyo-network/wasm": "~2.77.15",
"hash-wasm": "^4.10.0",

@@ -70,3 +70,3 @@ "sha.js": "^2.4.11"

"types": "dist/node/index.d.ts",
"version": "2.77.14"
"version": "2.77.15"
}

@@ -77,2 +77,12 @@ import { base16 } from '@scure/base'

/** @function jsonPayload Returns a clone of the payload that is JSON safe */
static jsonPayload<T extends AnyObject>(
/** @param payload The payload to process */
payload: T,
/** @param meta Keeps underscore (meta) fields if set to true */
meta = false,
): T {
return sortFields(removeEmptyFields(meta ? payload : deepOmitUnderscoreFields(payload)))
}
static stringifyHashFields<T extends AnyObject>(obj: T) {

@@ -95,2 +105,10 @@ return JSON.stringify(this.hashFields(obj))

}
/** @function jsonPayload Returns a clone of the payload that is JSON safe */
jsonPayload(
/** @param meta Keeps underscore (meta) fields if set to true */
meta = false,
): T {
return PayloadHasher.jsonPayload(this.obj, meta)
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc