UNPKG

hashable-cli

Version:

Generate consistent and predictable JSON output for hashing, version control, and testing. Sorts arrays based on a configurable priority list of fields, handles nested objects and arrays, and optionally sorts object keys alphabetically. Provides a comma

41 lines (40 loc) 1.31 kB
{ "name": "hashable-cli", "version": "2.0.1", "type": "module", "description": "Generate consistent and predictable JSON output for hashing, version control, and testing. Sorts arrays based on a configurable priority list of fields, handles nested objects and arrays, and optionally sorts object keys alphabetically. Provides a command-line interface, can be imported as a Node.js module, and works seamlessly in web browsers. Ideal for ensuring data integrity, simplifying comparisons, and generating stable hashes for JSON data.", "repository": { "type": "git", "url": "git+https://github.com/chernjie/hashable.git" }, "author": "CJ Lim <lim@chernjie.com>", "main": "./src/utils/hashable.js", "exports": { ".": "./src/utils/hashable.js" }, "scripts": { "build": "cp ./src/utils/hashable.js ./docs", "docs": "npm run build && node ./docs", "test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest" }, "bin": { "hashable-cli": "./bin/hashable", "hashable": "./bin/hashable" }, "license": "MIT", "devDependencies": { "express": "^4.18.1", "jest": "^29.7.0" }, "keywords": [ "stable", "sort", "deterministic", "hashable-cli", "hashable", "json", "command-line", "cli", "hash" ] }