Files
js-sha1/package.json
T
Yi-Cyuan ChenandClaude Opus 5.5 4ad1b7a3b2 ### Fixed
- Incorrect hash for `DataView` input, and for `Int8Array` with negative values in browsers.
- Throws `ArrayBuffer is not defined` in browsers without `ArrayBuffer`.

### Changed
- Multi-byte typed arrays such as `Uint16Array`, `Uint32Array` and `Float32Array` are now hashed by their underlying bytes, the same as Node.js `crypto` and Web Crypto. Previously each element was treated as one byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 13:31:57 +08:00

76 lines
2.0 KiB
JSON

{
"name": "js-sha1",
"version": "0.9.0",
"description": "A simple SHA1 hash function for JavaScript supports UTF-8 encoding.",
"main": "src/sha1.js",
"module": "build/sha1.mjs",
"exports": {
".": {
"types": "./index.d.ts",
"node": {
"import": "./build/sha1.node.mjs",
"require": "./src/sha1.js"
},
"import": "./build/sha1.mjs",
"require": "./src/sha1.js",
"default": "./src/sha1.js"
},
"./src/sha1.js": "./src/sha1.js",
"./build/sha1.min.js": "./build/sha1.min.js",
"./build/sha1.mjs": "./build/sha1.mjs",
"./build/sha1.min.mjs": "./build/sha1.min.mjs",
"./build/sha1.node.mjs": "./build/sha1.node.mjs",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"devDependencies": {
"@rollup/plugin-commonjs": "^29.0.3",
"@rollup/plugin-terser": "^1.0.2",
"expect.js": "~0.3.1",
"mocha": "^12.0.3",
"nyc": "^18.0.0",
"requirejs": "^2.3.8",
"rollup": "^4.65.0",
"tiny-worker": "^2.3.0",
"uglify-js": "^3.19.3"
},
"scripts": {
"test": "npm run build && npm run test:coverage",
"test:runtime": "mocha tests/node-test.js && mocha tests/esm-test.mjs",
"test:coverage": "nyc --reporter=text --reporter=html --reporter=lcov npm run test:runtime",
"report": "nyc --reporter=html --reporter=text npm run test:runtime",
"build": "rollup -c && uglifyjs src/sha1.js -c -m eval --comments -o build/sha1.min.js",
"prepack": "npm run build"
},
"repository": {
"type": "git",
"url": "https://github.com/emn178/js-sha1.git"
},
"keywords": [
"sha",
"sha1",
"encryption",
"cryptography",
"HMAC"
],
"license": "MIT",
"author": "Chen, Yi-Cyuan <emn178@gmail.com>",
"homepage": "https://github.com/emn178/js-sha1",
"bugs": {
"url": "https://github.com/emn178/js-sha1/issues"
},
"nyc": {
"exclude": [
"tests"
]
},
"browser": {
"crypto": false,
"buffer": false
},
"overrides": {
"glob": "^14.0.2",
"minimatch": "^11.0.1"
}
}