{"_id":"@apollosoftwarexyz/xxh3","_rev":"1-6381cdb5ba926e05eec7fbd469974e51","name":"@apollosoftwarexyz/xxh3","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@apollosoftwarexyz/xxh3","version":"1.0.0","_id":"@apollosoftwarexyz/xxh3@1.0.0","maintainers":[{"name":"samjakob","email":"me@samjakob.com"}],"dist":{"shasum":"c90da6aa61d78e6f02681b327962cad80203ba3c","tarball":"https://registry.npmjs.org/@apollosoftwarexyz/xxh3/-/xxh3-1.0.0.tgz","fileCount":12,"integrity":"sha512-lwhtIvV4KCVfrKIk+FE0I7jBCcIHTFNtwN1byorQlyAgj9uEf8nHqe7W6Jeim0cLH4XbIIgwYfaCMxH47sqUqw==","signatures":[{"sig":"MEQCIDvW7Fhy8P1la4HDbkJ5eTrH5KyhX4RiIRhkL2aE+6tnAiBTBX/3D9nFkRd2xIsfzoGX8WIshGk9l97UIkJp60JygA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264067},"type":"module","_from":"file:apollosoftwarexyz-xxh3-1.0.0.tgz","types":"./dist/xxh3.d.ts","exports":"./dist/xxh3.js","scripts":{"dev":"../scripts/build && vite build --watch","test":"vitest","bench":"node tool/benchmark.js","build":"../scripts/build && vite build"},"_npmUser":{"name":"samjakob","email":"me@samjakob.com"},"_resolved":"/private/var/folders/dx/8kcn4rt10zz0s5gg1d8rn54r0000gp/T/6edf67df901ec61b56e42cacfc20aa8f/apollosoftwarexyz-xxh3-1.0.0.tgz","_integrity":"sha512-lwhtIvV4KCVfrKIk+FE0I7jBCcIHTFNtwN1byorQlyAgj9uEf8nHqe7W6Jeim0cLH4XbIIgwYfaCMxH47sqUqw==","_npmVersion":"10.9.0","description":"XXH3 in JavaScript using WebAssembly","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.10","vitest":"^2.1.4","prettier":"^3.3.3","typescript":"^5.6.3","@types/node":"^22.8.6"},"_npmOperationalInternal":{"tmp":"tmp/xxh3_1.0.0_1730676094652_0.11613998962197725","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@apollosoftwarexyz/xxh3","description":"XXH3 in JavaScript using WebAssembly","repository":{"type":"git","url":"git+https://github.com/apollosoftwarexyz/xxh3.git"},"version":"1.1.0","license":"MIT","type":"module","types":"./dist/xxh3.d.ts","exports":"./dist/xxh3.js","devDependencies":{"@types/node":"^22.8.6","prettier":"^3.3.3","typescript":"^5.6.3","vite":"^5.4.10","vitest":"^2.1.4"},"scripts":{"build":"../scripts/build && vite build","test":"vitest","bench":"node tool/benchmark.js","dev":"../scripts/build && vite build --watch"},"_id":"@apollosoftwarexyz/xxh3@1.1.0","bugs":{"url":"https://github.com/apollosoftwarexyz/xxh3/issues"},"homepage":"https://github.com/apollosoftwarexyz/xxh3#readme","_integrity":"sha512-UKFnYEx/uI0a63tUSc50yfWZFCIriLMRePQApaMEWKdpIarCLrjdKQKYBiMs7OfYx2JFbDPg+lWP6xlL5JHm6w==","_resolved":"/private/var/folders/dx/8kcn4rt10zz0s5gg1d8rn54r0000gp/T/f62ecede2a9547f98ee4561929c10b72/apollosoftwarexyz-xxh3-1.1.0.tgz","_from":"file:apollosoftwarexyz-xxh3-1.1.0.tgz","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-UKFnYEx/uI0a63tUSc50yfWZFCIriLMRePQApaMEWKdpIarCLrjdKQKYBiMs7OfYx2JFbDPg+lWP6xlL5JHm6w==","shasum":"8900bf2ada13f6c38e6355cc460807fb175894ec","tarball":"https://registry.npmjs.org/@apollosoftwarexyz/xxh3/-/xxh3-1.1.0.tgz","fileCount":6,"unpackedSize":149326,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeRfkvhK5xk+qIgFRvoaI7f7em0Aq67K7iJrJhGK52RAIgQ5og1+mUEzDTaRZ+KkMflvJZoIRv0y/mhJNkIK08ajI="}]},"_npmUser":{"name":"samjakob","email":"me@samjakob.com"},"directories":{},"maintainers":[{"name":"samjakob","email":"me@samjakob.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xxh3_1.1.0_1730677448329_0.232733771285365"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-03T23:21:34.543Z","modified":"2024-11-03T23:44:08.730Z","1.0.0":"2024-11-03T23:21:34.826Z","1.1.0":"2024-11-03T23:44:08.556Z"},"description":"XXH3 in JavaScript using WebAssembly","maintainers":[{"name":"samjakob","email":"me@samjakob.com"}],"readme":"# @apollosoftwarexyz/xxh3\n\nA WebAssembly binding of the [xxh3](https://github.com/SamJakob/xxh3) Dart package.\n\n```javascript\nimport { xxh3String } from '@apollosoftwarexyz/xxh3';\n\nconst helloWorldBytes = Buffer.from('Hello, world!', 'utf-8');\nconsole.log(xxh3String(helloWorldBytes));\n```\n\n## Implementation\n\nThis package simply provides a typed wrapper around the Dart package, which has been compiled to WebAssembly.\nGiven that the implementation is quite small ~100KiB, the `.wasm` module has been base64-encoded and bundled into the\nJavaScript source. This should make the package highly portable to Node-based applications, Deno and the web.\n\nEssentially, this package should run anywhere that has the WebAssembly API and runtime available.\n\nThis npm package aims to expose the same API surface as the Dart package (though, where `int` is returned, an ES2020\n`BigInt` is returned instead - to work around JavaScript's inherent integer representation limits).\n\nThe test suite from the Dart package has been ported to vitest so this WebAssembly implementation matches the 100%\ncoverage of the Dart xxh3 package against known answers.\n\n## Performance\n\nPerformance is equivalent to the pre-optimized performance of the Dart library (i.e., 10x slower than the now current\nDart version) at ~3ns/byte. If you're looking for a more performant hashing algorithm (i.e., you don't specifically need\nxxh3, it's probably worth using `sha1` from `node:crypto` instead which performs at about ~0.4ns/byte - so just under\nthe current Dart version).\n\nAlternatively, it could be worth using FFI bindings at the potential cost of some portability.\n\nWebAssembly support has just landed on Dart stable, so we expect after a few release cycles - particularly if Dart2Wasm\ngets used by Flutter - there will be considerable improvements in performance that will lead to improvements here.\n\nThe use of `wasm-opt` with `-O3` (`-O4` was not available due to unsupported instructions), led to a ~0.2-0.5ns/byte\nimprovement in performance.\n","readmeFilename":"README.md","homepage":"https://github.com/apollosoftwarexyz/xxh3#readme","repository":{"type":"git","url":"git+https://github.com/apollosoftwarexyz/xxh3.git"},"bugs":{"url":"https://github.com/apollosoftwarexyz/xxh3/issues"},"license":"MIT"}