{"_id":"@adviser/ts-xxhash","_rev":"3-4e9f6e5e2c14e27d0f0b03e87883b047","name":"@adviser/ts-xxhash","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@adviser/ts-xxhash","version":"1.0.0","keywords":["xxhash","xxh"],"author":{"name":"Pierre Curto and Meno Abels"},"license":"MIT","_id":"@adviser/ts-xxhash@1.0.0","maintainers":[{"name":"fastandfearless","email":"meno.abels@gmail.com"}],"homepage":"https://github.com/mabels/ts-xxhash","bugs":{"url":"https://github.com/mabels/ts-xxhash/issues"},"dist":{"shasum":"8745bfebe98b9afddd716783a14f9d6635a290ac","tarball":"https://registry.npmjs.org/@adviser/ts-xxhash/-/ts-xxhash-1.0.0.tgz","fileCount":73,"integrity":"sha512-KOwgmGkX8CoHVMv+YCpVmxJIOt7kqaaOPujJF9I6WDdwCxDMhyXQk/kIVC6KKeg6R6g5ZVVTqJhu1xro6zPA/w==","signatures":[{"sig":"MEUCIEvZ0W2ggmTDlS60eZPdV01/5M57zCPXtIeQgczB2XvgAiEAiFSJnABZxm6cBaQgXmcSelCWd4cwVfiyUFvG1LalaJw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":256906},"main":"./cjs/index.js","type":"module","_from":"file:adviser-ts-xxhash-1.0.0.tgz","types":"./cjs/index.d.ts","exports":{".":{"types":"./esm/index.d.ts","import":"./esm/index.js","require":"./cjs/index.cjs"}},"scripts":{"lint":"eslint .","test":"pnpm run test:js; pnpm run test:deno","build":"pnpm run build:tsgo; pnpm run build:js; pnpm run build:deno","smoke":"bash ./smoke/it.sh","format":"prettier .","pubdir":"cement preparePubdir --baseDir . --srcDir lib","test:js":"vitest --run","build:js":"rm -rf dist/pkg ; mkdir -p dist/pkg; cp -pr ./dist/ts/* dist/pkg","presmoke":"pnpm run pubdir ; cd pubdir ; pnpm pack","build:tsc":"rm -rf ./dist/ts ; pnpm run /^build:tsc:/","test:deno":"deno run --quiet --allow-net --allow-write --allow-run  --allow-sys --allow-ffi  --allow-read --allow-env  ./node_modules/vitest/vitest.mjs --run --project node","build:deno":"deno publish --dry-run --unstable-sloppy-imports --allow-dirty --set-version 0.0.0-dev","build:tsgo":"rm -rf ./dist/ts ; pnpm run /^build:tsgo:/","deno:publish":"pnpm run pubdir; cd pubdir ; pnpm exec deno publish --allow-dirty --unstable-sloppy-imports","build:tsgo:cjs":"tsgo -p ./tsconfig.cjs.json","build:tsgo:esm":"tsgo -p ./tsconfig.esm.json","build:tsgo:global":"tsgo --noEmit"},"_npmUser":{"name":"fastandfearless","email":"meno.abels@gmail.com"},"_resolved":"/tmp/4c057d27ed3c20eb0e37b392c6361e26/adviser-ts-xxhash-1.0.0.tgz","_integrity":"sha512-KOwgmGkX8CoHVMv+YCpVmxJIOt7kqaaOPujJF9I6WDdwCxDMhyXQk/kIVC6KKeg6R6g5ZVVTqJhu1xro6zPA/w==","repository":{"url":"git+https://github.com/mabels/ts-xxhash.git","type":"git"},"_npmVersion":"10.9.3","description":"xxHash in Typescript","directories":{},"_nodeVersion":"22.19.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"zx":"^8.8.1","tsx":"^4.20.5","deno":"^2.4.4","cmd-ts":"^0.14.1","eslint":"^9.35.0","vitest":"^3.2.4","prettier":"^3.6.2","wrangler":"^4.35.0","@eslint/js":"^9.35.0","playwright":"^1.55.0","typescript":"^5.0.0","jscodeshift":"^17.3.0","@adviser/cement":"^0.4.33","@vitest/browser":"^3.2.4","typescript-eslint":"^8.43.0","playwright-chromium":"^1.55.0","vite-tsconfig-paths":"^5.1.4","@typescript/native-preview":"7.0.0-dev.20250909.1","@cloudflare/vitest-pool-workers":"^0.8.71"},"_npmOperationalInternal":{"tmp":"tmp/ts-xxhash_1.0.0_1757493319255_0.399889290378745","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@adviser/ts-xxhash","version":"1.0.1","keywords":["xxhash","xxh"],"author":{"name":"Pierre Curto and Meno Abels"},"license":"MIT","_id":"@adviser/ts-xxhash@1.0.1","maintainers":[{"name":"fastandfearless","email":"meno.abels@gmail.com"}],"homepage":"https://github.com/mabels/ts-xxhash","bugs":{"url":"https://github.com/mabels/ts-xxhash/issues"},"dist":{"shasum":"71672df16e19050faea0d4a79e7ddb7b46520a1b","tarball":"https://registry.npmjs.org/@adviser/ts-xxhash/-/ts-xxhash-1.0.1.tgz","fileCount":73,"integrity":"sha512-BmjQ9i0iZ5MjnHBEAy63LPY/wIXOlq1S5AvbwGKzWTJDngYxC7YjGSN3cqEdb5K7ZmOgVJUmYCcP4kKo8A6YvQ==","signatures":[{"sig":"MEUCIQCSuLt4+tySIuL7TaAaHx4BXzC56p1hZ83rGlNBlrXZKQIgeGCl1beZLrPlwcv+s1+kodqrJ1Nc+Jkbo0f4utoIles=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":257008},"main":"./cjs/index.js","type":"module","_from":"file:adviser-ts-xxhash-1.0.1.tgz","types":"./cjs/index.d.ts","exports":{".":{"types":"./esm/index.d.ts","import":"./esm/index.js","require":"./cjs/index.cjs"}},"scripts":{"lint":"eslint .","test":"pnpm run test:js; pnpm run test:deno","build":"pnpm run build:tsgo; pnpm run build:js; pnpm run build:deno","smoke":"bash ./smoke/it.sh","format":"prettier .","pubdir":"cement preparePubdir --baseDir . --srcDir lib","test:js":"vitest --run","build:js":"rm -rf dist/pkg ; mkdir -p dist/pkg; cp -pr ./dist/ts/* dist/pkg","presmoke":"pnpm run pubdir ; cd pubdir ; pnpm pack","build:tsc":"rm -rf ./dist/ts ; pnpm run /^build:tsc:/","test:deno":"deno run --quiet --allow-net --allow-write --allow-run  --allow-sys --allow-ffi  --allow-read --allow-env  ./node_modules/vitest/vitest.mjs --run --project node","build:deno":"deno publish --dry-run --unstable-sloppy-imports --allow-dirty --set-version 0.0.0-dev","build:tsgo":"rm -rf ./dist/ts ; pnpm run /^build:tsgo:/","deno:publish":"pnpm run pubdir; cd pubdir ; pnpm exec deno publish --allow-dirty --unstable-sloppy-imports","build:tsgo:cjs":"tsgo -p ./tsconfig.cjs.json","build:tsgo:esm":"tsgo -p ./tsconfig.esm.json","build:tsgo:global":"tsgo --noEmit"},"_npmUser":{"name":"fastandfearless","email":"meno.abels@gmail.com"},"_resolved":"/tmp/3f94e607ab1337dc4b2b4b0a1ee4abe1/adviser-ts-xxhash-1.0.1.tgz","_integrity":"sha512-BmjQ9i0iZ5MjnHBEAy63LPY/wIXOlq1S5AvbwGKzWTJDngYxC7YjGSN3cqEdb5K7ZmOgVJUmYCcP4kKo8A6YvQ==","repository":{"url":"git+https://github.com/mabels/ts-xxhash.git","type":"git"},"_npmVersion":"10.9.3","description":"xxHash in Typescript","directories":{},"_nodeVersion":"22.19.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"zx":"^8.8.1","tsx":"^4.20.5","deno":"^2.4.4","cmd-ts":"^0.14.1","eslint":"^9.35.0","vitest":"^3.2.4","prettier":"^3.6.2","wrangler":"^4.35.0","@eslint/js":"^9.35.0","playwright":"^1.55.0","typescript":"^5.0.0","jscodeshift":"^17.3.0","@adviser/cement":"^0.4.33","@vitest/browser":"^3.2.4","typescript-eslint":"^8.43.0","playwright-chromium":"^1.55.0","vite-tsconfig-paths":"^5.1.4","@typescript/native-preview":"7.0.0-dev.20250909.1","@cloudflare/vitest-pool-workers":"^0.8.71"},"_npmOperationalInternal":{"tmp":"tmp/ts-xxhash_1.0.1_1757493492995_0.8171676546656297","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@adviser/ts-xxhash","version":"1.0.2","description":"xxHash in Typescript","main":"./cjs/index.js","exports":{".":{"types":"./esm/index.d.ts","require":"./cjs/index.cjs","import":"./esm/index.js"}},"type":"module","repository":{"type":"git","url":"git+https://github.com/mabels/ts-xxhash.git"},"keywords":["xxhash","xxh"],"author":{"name":"Pierre Curto and Meno Abels"},"license":"MIT","bugs":{"url":"https://github.com/mabels/ts-xxhash/issues"},"homepage":"https://github.com/mabels/ts-xxhash","dependencies":{},"devDependencies":{"@adviser/cement":"^0.4.33","@cloudflare/vitest-pool-workers":"^0.8.71","@eslint/js":"^9.35.0","@typescript/native-preview":"7.0.0-dev.20250909.1","@vitest/browser":"^3.2.4","cmd-ts":"^0.14.1","deno":"^2.4.4","eslint":"^9.35.0","jscodeshift":"^17.3.0","playwright":"^1.55.0","playwright-chromium":"^1.55.0","prettier":"^3.6.2","tsx":"^4.20.5","typescript":"^5.0.0","typescript-eslint":"^8.43.0","vite-tsconfig-paths":"^5.1.4","vitest":"^3.2.4","wrangler":"^4.35.0","zx":"^8.8.1"},"scripts":{"build":"pnpm run build:tsgo; pnpm run build:js; pnpm run build:deno","build:tsc":"rm -rf ./dist/ts ; pnpm run /^build:tsc:/","build:tsgo":"rm -rf ./dist/ts ; pnpm run /^build:tsgo:/","build:tsgo:global":"tsgo --noEmit","build:tsgo:esm":"tsgo -p ./tsconfig.esm.json","build:tsgo:cjs":"tsgo -p ./tsconfig.cjs.json","build:js":"rm -rf dist/pkg ; mkdir -p dist/pkg; cp -pr ./dist/ts/* dist/pkg","build:deno":"deno publish --dry-run --unstable-sloppy-imports --allow-dirty --set-version 0.0.0-dev","test":"pnpm run test:js; pnpm run test:deno","test:deno":"deno run --quiet --allow-net --allow-write --allow-run  --allow-sys --allow-ffi  --allow-read --allow-env  ./node_modules/vitest/vitest.mjs --run --project node","test:js":"vitest --run","bench":"deno run --quiet --allow-net --allow-write --allow-run  --allow-sys --allow-ffi  --allow-read --allow-env  ./node_modules/vitest/vitest.mjs bench --project node --run test/bench.bench.ts","lint":"eslint .","pubdir":"cement preparePubdir --baseDir . --srcDir lib","presmoke":"pnpm run pubdir ; cd pubdir ; pnpm pack","deno:publish":"pnpm run pubdir; cd pubdir ; pnpm exec deno publish --allow-dirty --unstable-sloppy-imports","smoke":"bash ./smoke/it.sh","format":"prettier ."},"_id":"@adviser/ts-xxhash@1.0.2","types":"./cjs/index.d.ts","_integrity":"sha512-WSryk539sIKc1tYAJ+05Fc7HnH+IPOjoGhtmZSXHHibPH1970EvGah0OG7wnPUn/a0gfG51cwQUtMwNosA+kCA==","_resolved":"/tmp/ac061ac51f783c7e1009d259ee4e2d67/adviser-ts-xxhash-1.0.2.tgz","_from":"file:adviser-ts-xxhash-1.0.2.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-WSryk539sIKc1tYAJ+05Fc7HnH+IPOjoGhtmZSXHHibPH1970EvGah0OG7wnPUn/a0gfG51cwQUtMwNosA+kCA==","shasum":"70e12f9734e47e2c1e64327ab9616f00fec53f30","tarball":"https://registry.npmjs.org/@adviser/ts-xxhash/-/ts-xxhash-1.0.2.tgz","fileCount":73,"unpackedSize":256947,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC0vaofdlA3uiUY84TQk1WfVWtK6mct0A2pHfu5XNSMCgIhAJk4o39KsQry1hwgQzr+Z6GmvqR33f7SYLOSHS6X3I9w"}]},"_npmUser":{"name":"fastandfearless","email":"meno.abels@gmail.com"},"directories":{},"maintainers":[{"name":"fastandfearless","email":"meno.abels@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ts-xxhash_1.0.2_1757495884533_0.560075216492308"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-10T08:35:19.167Z","modified":"2025-09-10T09:18:04.920Z","1.0.0":"2025-09-10T08:35:19.420Z","1.0.1":"2025-09-10T08:38:13.194Z","1.0.2":"2025-09-10T09:18:04.720Z"},"bugs":{"url":"https://github.com/mabels/ts-xxhash/issues"},"author":{"name":"Pierre Curto and Meno Abels"},"license":"MIT","homepage":"https://github.com/mabels/ts-xxhash","keywords":["xxhash","xxh"],"repository":{"type":"git","url":"git+https://github.com/mabels/ts-xxhash.git"},"description":"xxHash in Typescript","maintainers":[{"name":"fastandfearless","email":"meno.abels@gmail.com"}],"readme":"# Javascript implementation of xxHash\n\n## Synopsis\n\nxxHash is a very fast hashing algorithm (see the details [here](https://github.com/Cyan4973/xxHash)). xxhashjs is a Javascript implementation of it, written in 100% Javascript. Although not as fast as the C version, it does perform pretty well given the current Javascript limitations in handling unsigned 32 bits integers.\n\n## Installation\n\nIn nodejs:\n\n    npm install xxhashjs\n\nIn the browser, include the following, and access the constructor with _XXH_:\n\n```javascript\n<script src=\"/your/path/to/xxhash.js\"></script>\n```\n\n## Examples\n\n- In one step:\n\n```javascript\nvar h = XXH.h32(\"abcd\", 0xabcd).toString(16); // seed = 0xABCD\n```\n\n> 0xCDA8FAE4\n\n- In several steps (useful in conjunction of NodeJS streams):\n\n```javascript\nvar H = XXH.h32(0xabcd); // seed = 0xABCD\nvar h = H.update(\"abcd\").digest().toString(16);\n```\n\n> 0xCDA8FAE4\n\n- More examples in the examples directory:\n  - Compute xxHash from a file data\n  - Use xxHashjs in the browser\n\n## Usage\n\n- XXH makes 2 functions available for 32 bits XXH and 64 bits XXH respectively, with the same signature:\n  - XXH.h32\n  - XXH.h64\n\n- In one step:\n  `XXH.h32(<data>, <seed>)`\n  The data can either be a string, an ArrayBuffer or a NodeJS Buffer object.\n  The seed can either be a number or a UINT32 object.\n\n- In several steps: \\* instantiate a new XXH object H:\n  `XXH.h32(<seed>)` or `XXH.h32()`\n  The seed can be set later on with the `init` method\n\n      * add data to the hash calculation:\n\n  `H.update(<data>)`\n\n      * finish the calculations:\n\n  `H.digest()`\n\nThe object returned can be converted to a string with `toString(<radix>)` or a number `toNumber()`.\nOnce `digest()` has been called, the object can be reused. The same seed will be used or it can be changed with `init(<seed>)`.\n\n## Methods\n\n- `XXH.h32()`\n  - `.init(<seed>)`\n    Initialize the XXH object with the given seed. The seed can either be a number or a UINT32 object.\n  - `.update(<data>)`\n    Add data for hashing. The data can either be a string, an ArrayBuffer or a NodeJS Buffer object. \\* `digest()` (_UINT32_)\n    Finalize the hash calculations and returns an UINT32 object. The hash value can be retrieved with toString(<radix>).\n\n- `XXH.h64()`\n  - `.init(<seed>)`\n    Initialize the XXH object with the given seed. The seed can either be a number or a UINT64 object.\n  - `.update(<data>)`\n    Add data for hashing. The data can either be a string, an ArrayBuffer or a NodeJS Buffer object.\n  - `.digest()` (_UINT64_)\n    Finalize the hash calculations and returns an UINT64 object. The hash value can be retrieved with toString(<radix>).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}