Socket
Socket
Sign inDemoInstall

xxhash-wasm

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

cjs/xxhash-wasm.js

2

esm/xxhash-wasm.js

@@ -1,2 +0,2 @@

const wasmBytes=new Uint8Array([0,97,115,109,1,0,0,0,1,32,5,96,3,127,127,127,1,127,96,2,127,127,1,127,96,3,127,127,126,1,126,96,2,126,126,1,126,96,2,127,127,0,3,7,6,0,1,2,3,3,4,5,3,1,0,1,6,113,10,127,0,65,177,243,221,241,121,11,127,0,65,247,148,175,175,120,11,127,0,65,189,220,202,149,124,11,127,0,65,175,214,211,190,2,11,127,0,65,177,207,217,178,1,11,126,0,66,135,149,175,175,152,182,222,155,158,127,11,126,0,66,207,214,211,190,210,199,171,217,66,11,126,0,66,249,243,221,241,153,246,153,171,22,11,126,0,66,227,220,202,149,252,206,242,245,133,127,11,126,0,66,197,207,217,178,241,229,186,234,39,11,7,23,3,3,109,101,109,2,0,5,120,120,104,51,50,0,0,5,120,120,104,54,52,0,5,10,129,7,6,193,2,1,7,127,32,0,32,1,106,33,4,32,1,65,16,79,4,64,2,64,32,4,65,16,107,33,5,32,2,35,0,106,35,1,106,33,6,32,2,35,1,106,33,7,32,2,65,0,106,33,8,32,2,35,0,107,33,9,3,64,32,6,32,0,40,2,0,16,1,33,6,32,0,65,4,106,33,0,32,7,32,0,40,2,0,16,1,33,7,32,0,65,4,106,33,0,32,8,32,0,40,2,0,16,1,33,8,32,0,65,4,106,33,0,32,9,32,0,40,2,0,16,1,33,9,32,0,65,4,106,33,0,32,0,32,5,77,13,0,11,32,6,65,1,119,32,7,65,7,119,32,8,65,12,119,32,9,65,18,119,106,106,106,33,3,11,5,32,2,35,4,106,33,3,11,32,3,32,1,106,33,3,2,64,3,64,32,0,65,4,106,32,4,75,13,1,32,3,32,0,40,2,0,35,2,108,106,33,3,32,3,65,17,119,35,3,108,33,3,32,0,65,4,106,33,0,12,0,11,11,2,64,3,64,32,0,32,4,79,13,1,32,3,32,0,45,0,0,35,4,108,106,33,3,32,3,65,11,119,35,0,108,33,3,32,0,65,1,106,33,0,12,0,11,11,32,3,32,3,65,15,118,115,33,3,32,3,35,1,108,33,3,32,3,32,3,65,13,118,115,33,3,32,3,35,2,108,33,3,32,3,32,3,65,16,118,115,33,3,32,3,11,28,0,32,0,32,1,35,1,108,106,33,0,32,0,65,13,119,33,0,32,0,35,0,108,33,0,32,0,11,153,3,3,1,126,2,127,4,126,32,0,32,1,106,33,4,32,1,65,32,79,4,64,2,64,32,4,65,32,107,33,5,32,2,35,5,124,35,6,124,33,6,32,2,35,6,124,33,7,32,2,66,0,124,33,8,32,2,35,5,125,33,9,3,64,32,6,32,0,41,3,0,16,3,33,6,32,0,65,8,106,33,0,32,7,32,0,41,3,0,16,3,33,7,32,0,65,8,106,33,0,32,8,32,0,41,3,0,16,3,33,8,32,0,65,8,106,33,0,32,9,32,0,41,3,0,16,3,33,9,32,0,65,8,106,33,0,32,0,32,5,77,13,0,11,32,6,66,1,137,32,7,66,7,137,32,8,66,12,137,32,9,66,18,137,124,124,124,33,3,32,3,32,6,16,4,33,3,32,3,32,7,16,4,33,3,32,3,32,8,16,4,33,3,32,3,32,9,16,4,33,3,11,5,32,2,35,9,124,33,3,11,32,3,32,1,173,124,33,3,2,64,3,64,32,0,65,8,106,32,4,75,13,1,32,3,66,0,32,0,41,3,0,16,3,133,33,3,32,3,66,27,137,35,5,126,35,8,124,33,3,32,0,65,8,106,33,0,12,0,11,11,32,0,65,4,106,32,4,77,4,64,2,64,32,3,32,0,53,2,0,35,5,126,133,33,3,32,3,66,23,137,35,6,126,35,7,124,33,3,32,0,65,4,106,33,0,11,11,2,64,3,64,32,0,32,4,79,13,1,32,3,32,0,49,0,0,35,9,126,133,33,3,32,3,66,11,137,35,5,126,33,3,32,0,65,1,106,33,0,12,0,11,11,32,3,32,3,66,33,136,133,33,3,32,3,35,6,126,33,3,32,3,32,3,66,29,136,133,33,3,32,3,35,7,126,33,3,32,3,32,3,66,32,136,133,33,3,32,3,11,28,0,32,0,32,1,35,6,126,124,33,0,32,0,66,31,137,33,0,32,0,35,5,126,33,0,32,0,11,29,0,66,0,32,1,16,3,33,1,32,0,32,1,133,33,0,32,0,35,5,126,35,8,124,33,0,32,0,11,73,3,1,126,1,127,1,126,32,0,65,0,106,33,3,32,0,53,2,0,66,32,134,32,0,65,4,106,53,2,0,132,33,2,32,0,65,8,106,33,0,32,0,32,1,32,2,16,2,33,4,32,3,32,4,66,32,136,167,54,2,0,32,3,65,4,106,32,4,167,54,2,0,11]);class Xxhash{constructor(){this.wasmInstance=WebAssembly.instantiate(wasmBytes).then(t=>t.instance)}async h32(t,e=0){const n=new TextEncoder("utf-8").encode(t);var s=(await this.wasmInstance).exports;const r=s.mem,a=s.xxh32;return this.writeBufferToMemory(n,r,0),(a(0,n.byteLength,e)>>>0).toString(16)}async h64(t,e=0,n=0){const s=new TextEncoder("utf-8").encode(t);var r=(await this.wasmInstance).exports;const a=r.mem,o=r.xxh64;this.writeBufferToMemory(s,a,8);const i=new DataView(a.buffer);return i.setUint32(0,e,!0),i.setUint32(4,n,!0),o(0,s.byteLength),i.getUint32(0,!0).toString(16)+i.getUint32(4,!0).toString(16)}writeBufferToMemory(t,e,n){if(e.buffer.byteLength<t.byteLength+n){const s=Math.ceil((t.byteLength+n-e.buffer.byteLength)/65536);e.grow(s)}new Uint8Array(e.buffer,n).set(t)}}export default Xxhash;
const wasmBytes=new Uint8Array([0,97,115,109,1,0,0,0,1,32,5,96,3,127,127,127,1,127,96,2,127,127,1,127,96,3,127,127,126,1,126,96,2,126,126,1,126,96,2,127,127,0,3,7,6,0,1,2,3,3,4,5,3,1,0,1,6,113,10,127,0,65,177,243,221,241,121,11,127,0,65,247,148,175,175,120,11,127,0,65,189,220,202,149,124,11,127,0,65,175,214,211,190,2,11,127,0,65,177,207,217,178,1,11,126,0,66,135,149,175,175,152,182,222,155,158,127,11,126,0,66,207,214,211,190,210,199,171,217,66,11,126,0,66,249,243,221,241,153,246,153,171,22,11,126,0,66,227,220,202,149,252,206,242,245,133,127,11,126,0,66,197,207,217,178,241,229,186,234,39,11,7,23,3,3,109,101,109,2,0,5,120,120,104,51,50,0,0,5,120,120,104,54,52,0,5,10,129,7,6,193,2,1,7,127,32,0,32,1,106,33,4,32,1,65,16,79,4,64,2,64,32,4,65,16,107,33,5,32,2,35,0,106,35,1,106,33,6,32,2,35,1,106,33,7,32,2,65,0,106,33,8,32,2,35,0,107,33,9,3,64,32,6,32,0,40,2,0,16,1,33,6,32,0,65,4,106,33,0,32,7,32,0,40,2,0,16,1,33,7,32,0,65,4,106,33,0,32,8,32,0,40,2,0,16,1,33,8,32,0,65,4,106,33,0,32,9,32,0,40,2,0,16,1,33,9,32,0,65,4,106,33,0,32,0,32,5,77,13,0,11,32,6,65,1,119,32,7,65,7,119,32,8,65,12,119,32,9,65,18,119,106,106,106,33,3,11,5,32,2,35,4,106,33,3,11,32,3,32,1,106,33,3,2,64,3,64,32,0,65,4,106,32,4,75,13,1,32,3,32,0,40,2,0,35,2,108,106,33,3,32,3,65,17,119,35,3,108,33,3,32,0,65,4,106,33,0,12,0,11,11,2,64,3,64,32,0,32,4,79,13,1,32,3,32,0,45,0,0,35,4,108,106,33,3,32,3,65,11,119,35,0,108,33,3,32,0,65,1,106,33,0,12,0,11,11,32,3,32,3,65,15,118,115,33,3,32,3,35,1,108,33,3,32,3,32,3,65,13,118,115,33,3,32,3,35,2,108,33,3,32,3,32,3,65,16,118,115,33,3,32,3,11,28,0,32,0,32,1,35,1,108,106,33,0,32,0,65,13,119,33,0,32,0,35,0,108,33,0,32,0,11,153,3,3,1,126,2,127,4,126,32,0,32,1,106,33,4,32,1,65,32,79,4,64,2,64,32,4,65,32,107,33,5,32,2,35,5,124,35,6,124,33,6,32,2,35,6,124,33,7,32,2,66,0,124,33,8,32,2,35,5,125,33,9,3,64,32,6,32,0,41,3,0,16,3,33,6,32,0,65,8,106,33,0,32,7,32,0,41,3,0,16,3,33,7,32,0,65,8,106,33,0,32,8,32,0,41,3,0,16,3,33,8,32,0,65,8,106,33,0,32,9,32,0,41,3,0,16,3,33,9,32,0,65,8,106,33,0,32,0,32,5,77,13,0,11,32,6,66,1,137,32,7,66,7,137,32,8,66,12,137,32,9,66,18,137,124,124,124,33,3,32,3,32,6,16,4,33,3,32,3,32,7,16,4,33,3,32,3,32,8,16,4,33,3,32,3,32,9,16,4,33,3,11,5,32,2,35,9,124,33,3,11,32,3,32,1,173,124,33,3,2,64,3,64,32,0,65,8,106,32,4,75,13,1,32,3,66,0,32,0,41,3,0,16,3,133,33,3,32,3,66,27,137,35,5,126,35,8,124,33,3,32,0,65,8,106,33,0,12,0,11,11,32,0,65,4,106,32,4,77,4,64,2,64,32,3,32,0,53,2,0,35,5,126,133,33,3,32,3,66,23,137,35,6,126,35,7,124,33,3,32,0,65,4,106,33,0,11,11,2,64,3,64,32,0,32,4,79,13,1,32,3,32,0,49,0,0,35,9,126,133,33,3,32,3,66,11,137,35,5,126,33,3,32,0,65,1,106,33,0,12,0,11,11,32,3,32,3,66,33,136,133,33,3,32,3,35,6,126,33,3,32,3,32,3,66,29,136,133,33,3,32,3,35,7,126,33,3,32,3,32,3,66,32,136,133,33,3,32,3,11,28,0,32,0,32,1,35,6,126,124,33,0,32,0,66,31,137,33,0,32,0,35,5,126,33,0,32,0,11,29,0,66,0,32,1,16,3,33,1,32,0,32,1,133,33,0,32,0,35,5,126,35,8,124,33,0,32,0,11,73,3,1,126,1,127,1,126,32,0,65,0,106,33,3,32,0,53,2,0,66,32,134,32,0,65,4,106,53,2,0,132,33,2,32,0,65,8,106,33,0,32,0,32,1,32,2,16,2,33,4,32,3,32,4,66,32,136,167,54,2,0,32,3,65,4,106,32,4,167,54,2,0,11]),encoder=new TextEncoder("utf-8");class Xxhash{constructor(){this.wasmInstance=WebAssembly.instantiate(wasmBytes).then(t=>t.instance)}async h32(t,e=0){const n=encoder.encode(t);var s=(await this.wasmInstance).exports;const r=s.mem,a=s.xxh32;return this.writeBufferToMemory(n,r,0),(a(0,n.byteLength,e)>>>0).toString(16)}async h64(t,e=0,n=0){const s=encoder.encode(t);var r=(await this.wasmInstance).exports;const a=r.mem,o=r.xxh64;this.writeBufferToMemory(s,a,8);const i=new DataView(a.buffer);return i.setUint32(0,e,!0),i.setUint32(4,n,!0),o(0,s.byteLength),i.getUint32(0,!0).toString(16)+i.getUint32(4,!0).toString(16)}writeBufferToMemory(t,e,n){if(e.buffer.byteLength<t.byteLength+n){const s=Math.ceil((t.byteLength+n-e.buffer.byteLength)/65536);e.grow(s)}new Uint8Array(e.buffer,n).set(t)}}export default Xxhash;
//# sourceMappingURL=xxhash-wasm.js.map
{
"name": "xxhash-wasm",
"version": "0.1.0",
"description": "xxhash algorithm implemented in WebAssembly",
"main": "esm/xxhash-wasm.js",
"version": "0.2.0",
"description": "A WebAssembly implementation of xxHash",
"main": "cjs/xxhash-wasm.js",
"module": "esm/xxhash-wasm.js",

@@ -14,11 +14,20 @@ "author": "Michael Jungo <michaeljungo92@gmail.com>",

"files": [
"cjs",
"esm",
"umd"
],
"keywords": [
"xxhash",
"hash",
"wasm",
"webassembly"
],
"scripts": {
"build": "yarn run build-wasm-docker && yarn run build-js",
"build-js": "rollup -c",
"build-js": "yarn run build-browser && yarn run build-node",
"build-browser": "rollup -c",
"build-node": "TARGET=node rollup -c",
"build-wasm": "wat2wasm src/xxhash.wat -o src/xxhash.wasm",
"build-wasm-docker": "docker run -it --rm -u $(id -u):$(id -g) -v $PWD:/src -w /src jungomi/wabt wat2wasm src/xxhash.wat -o src/xxhash.wasm",
"clean": "rimraf coverage esm umd",
"clean": "rimraf coverage cjs esm umd",
"fix": "eslint . --fix",

@@ -29,3 +38,3 @@ "lint": "eslint .",

"test-coverage": "jest --coverage",
"prepublish": "yarn run build"
"prepublish": "yarn run clean && yarn run build"
},

@@ -32,0 +41,0 @@ "dependencies": {},

@@ -8,2 +8,35 @@ # xxhash-wasm

## Installation
### From npm
```sh
npm install --save xxhash-wasm
```
Or with Yarn:
```sh
yarn add xxhash-wasm
```
### From [Unpkg][unpkg]
#### ES Modules
```html
<script type="module">
import Xxhash from "https://unpkg.com/xxhash-wasm/esm/xxhash-wasm.js";
</script>
```
#### UMD build
```html
<script src="https://unpkg.com/xxhash-wasm/umd/xxhash-wasm.js"></script>
```
The global `Xxhash` will be available.
## Usage

@@ -27,2 +60,29 @@

### Node
This was initially meant for the browser, but Node 8 also added support for
WebAssembly, so it can be run in Node as well. The implementation uses
the browser API [`TextEncoder`][textencoder-mdn], which is has been added
recently to Node as [`util.TextEncoder`][textencoder-node], but it is not
a global. To compensate for that, a CommonJS bundle is created which
automatically imports `util.TextEncoder`.
*Note: You will see a warning that it's experimental, but it should work just
fine.*
The `main` field in `package.json` points to the CommonJS bundle, so you can
require it as usual.
```javascript
const Xxhash = require("xxhash-wasm");
// Or explicitly use the cjs bundle
const Xxhash = require("xxhash-wasm/cjs/xxhash-wasm");
```
If you want to bundle your application for Node with a module bundler that uses
the `module` field in `package.json`, such as webpack or Rollup, you will need
to explicitly import `xxhash-wasm/cjs/xxhash-wasm` otherwise the browser version
is used.
## API

@@ -68,4 +128,7 @@

[npm-link]: https://www.npmjs.com/package/xxhash-wasm
[textencoder-mdn]: https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/TextEncoder
[textencoder-node]: https://nodejs.org/api/util.html#util_class_util_textencoder
[travis]: https://travis-ci.org/jungomi/xxhash-wasm
[travis-badge]: https://img.shields.io/travis/jungomi/xxhash-wasm/master.svg?style=flat-square
[unpkg]: https://unpkg.com/
[xxhash]: https://github.com/Cyan4973/xxHash

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Xxhash=e()}(this,function(){"use strict";const t=new Uint8Array([0,97,115,109,1,0,0,0,1,32,5,96,3,127,127,127,1,127,96,2,127,127,1,127,96,3,127,127,126,1,126,96,2,126,126,1,126,96,2,127,127,0,3,7,6,0,1,2,3,3,4,5,3,1,0,1,6,113,10,127,0,65,177,243,221,241,121,11,127,0,65,247,148,175,175,120,11,127,0,65,189,220,202,149,124,11,127,0,65,175,214,211,190,2,11,127,0,65,177,207,217,178,1,11,126,0,66,135,149,175,175,152,182,222,155,158,127,11,126,0,66,207,214,211,190,210,199,171,217,66,11,126,0,66,249,243,221,241,153,246,153,171,22,11,126,0,66,227,220,202,149,252,206,242,245,133,127,11,126,0,66,197,207,217,178,241,229,186,234,39,11,7,23,3,3,109,101,109,2,0,5,120,120,104,51,50,0,0,5,120,120,104,54,52,0,5,10,129,7,6,193,2,1,7,127,32,0,32,1,106,33,4,32,1,65,16,79,4,64,2,64,32,4,65,16,107,33,5,32,2,35,0,106,35,1,106,33,6,32,2,35,1,106,33,7,32,2,65,0,106,33,8,32,2,35,0,107,33,9,3,64,32,6,32,0,40,2,0,16,1,33,6,32,0,65,4,106,33,0,32,7,32,0,40,2,0,16,1,33,7,32,0,65,4,106,33,0,32,8,32,0,40,2,0,16,1,33,8,32,0,65,4,106,33,0,32,9,32,0,40,2,0,16,1,33,9,32,0,65,4,106,33,0,32,0,32,5,77,13,0,11,32,6,65,1,119,32,7,65,7,119,32,8,65,12,119,32,9,65,18,119,106,106,106,33,3,11,5,32,2,35,4,106,33,3,11,32,3,32,1,106,33,3,2,64,3,64,32,0,65,4,106,32,4,75,13,1,32,3,32,0,40,2,0,35,2,108,106,33,3,32,3,65,17,119,35,3,108,33,3,32,0,65,4,106,33,0,12,0,11,11,2,64,3,64,32,0,32,4,79,13,1,32,3,32,0,45,0,0,35,4,108,106,33,3,32,3,65,11,119,35,0,108,33,3,32,0,65,1,106,33,0,12,0,11,11,32,3,32,3,65,15,118,115,33,3,32,3,35,1,108,33,3,32,3,32,3,65,13,118,115,33,3,32,3,35,2,108,33,3,32,3,32,3,65,16,118,115,33,3,32,3,11,28,0,32,0,32,1,35,1,108,106,33,0,32,0,65,13,119,33,0,32,0,35,0,108,33,0,32,0,11,153,3,3,1,126,2,127,4,126,32,0,32,1,106,33,4,32,1,65,32,79,4,64,2,64,32,4,65,32,107,33,5,32,2,35,5,124,35,6,124,33,6,32,2,35,6,124,33,7,32,2,66,0,124,33,8,32,2,35,5,125,33,9,3,64,32,6,32,0,41,3,0,16,3,33,6,32,0,65,8,106,33,0,32,7,32,0,41,3,0,16,3,33,7,32,0,65,8,106,33,0,32,8,32,0,41,3,0,16,3,33,8,32,0,65,8,106,33,0,32,9,32,0,41,3,0,16,3,33,9,32,0,65,8,106,33,0,32,0,32,5,77,13,0,11,32,6,66,1,137,32,7,66,7,137,32,8,66,12,137,32,9,66,18,137,124,124,124,33,3,32,3,32,6,16,4,33,3,32,3,32,7,16,4,33,3,32,3,32,8,16,4,33,3,32,3,32,9,16,4,33,3,11,5,32,2,35,9,124,33,3,11,32,3,32,1,173,124,33,3,2,64,3,64,32,0,65,8,106,32,4,75,13,1,32,3,66,0,32,0,41,3,0,16,3,133,33,3,32,3,66,27,137,35,5,126,35,8,124,33,3,32,0,65,8,106,33,0,12,0,11,11,32,0,65,4,106,32,4,77,4,64,2,64,32,3,32,0,53,2,0,35,5,126,133,33,3,32,3,66,23,137,35,6,126,35,7,124,33,3,32,0,65,4,106,33,0,11,11,2,64,3,64,32,0,32,4,79,13,1,32,3,32,0,49,0,0,35,9,126,133,33,3,32,3,66,11,137,35,5,126,33,3,32,0,65,1,106,33,0,12,0,11,11,32,3,32,3,66,33,136,133,33,3,32,3,35,6,126,33,3,32,3,32,3,66,29,136,133,33,3,32,3,35,7,126,33,3,32,3,32,3,66,32,136,133,33,3,32,3,11,28,0,32,0,32,1,35,6,126,124,33,0,32,0,66,31,137,33,0,32,0,35,5,126,33,0,32,0,11,29,0,66,0,32,1,16,3,33,1,32,0,32,1,133,33,0,32,0,35,5,126,35,8,124,33,0,32,0,11,73,3,1,126,1,127,1,126,32,0,65,0,106,33,3,32,0,53,2,0,66,32,134,32,0,65,4,106,53,2,0,132,33,2,32,0,65,8,106,33,0,32,0,32,1,32,2,16,2,33,4,32,3,32,4,66,32,136,167,54,2,0,32,3,65,4,106,32,4,167,54,2,0,11]);class e{constructor(){this.wasmInstance=WebAssembly.instantiate(t).then(t=>t.instance)}async h32(t,e=0){const n=new TextEncoder("utf-8").encode(t);var r=(await this.wasmInstance).exports;const s=r.mem,o=r.xxh32;return this.writeBufferToMemory(n,s,0),(o(0,n.byteLength,e)>>>0).toString(16)}async h64(t,e=0,n=0){const r=new TextEncoder("utf-8").encode(t);var s=(await this.wasmInstance).exports;const o=s.mem,i=s.xxh64;this.writeBufferToMemory(r,o,8);const f=new DataView(o.buffer);return f.setUint32(0,e,!0),f.setUint32(4,n,!0),i(0,r.byteLength),f.getUint32(0,!0).toString(16)+f.getUint32(4,!0).toString(16)}writeBufferToMemory(t,e,n){if(e.buffer.byteLength<t.byteLength+n){const r=Math.ceil((t.byteLength+n-e.buffer.byteLength)/65536);e.grow(r)}new Uint8Array(e.buffer,n).set(t)}}return e});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Xxhash=e()}(this,function(){"use strict";const t=new Uint8Array([0,97,115,109,1,0,0,0,1,32,5,96,3,127,127,127,1,127,96,2,127,127,1,127,96,3,127,127,126,1,126,96,2,126,126,1,126,96,2,127,127,0,3,7,6,0,1,2,3,3,4,5,3,1,0,1,6,113,10,127,0,65,177,243,221,241,121,11,127,0,65,247,148,175,175,120,11,127,0,65,189,220,202,149,124,11,127,0,65,175,214,211,190,2,11,127,0,65,177,207,217,178,1,11,126,0,66,135,149,175,175,152,182,222,155,158,127,11,126,0,66,207,214,211,190,210,199,171,217,66,11,126,0,66,249,243,221,241,153,246,153,171,22,11,126,0,66,227,220,202,149,252,206,242,245,133,127,11,126,0,66,197,207,217,178,241,229,186,234,39,11,7,23,3,3,109,101,109,2,0,5,120,120,104,51,50,0,0,5,120,120,104,54,52,0,5,10,129,7,6,193,2,1,7,127,32,0,32,1,106,33,4,32,1,65,16,79,4,64,2,64,32,4,65,16,107,33,5,32,2,35,0,106,35,1,106,33,6,32,2,35,1,106,33,7,32,2,65,0,106,33,8,32,2,35,0,107,33,9,3,64,32,6,32,0,40,2,0,16,1,33,6,32,0,65,4,106,33,0,32,7,32,0,40,2,0,16,1,33,7,32,0,65,4,106,33,0,32,8,32,0,40,2,0,16,1,33,8,32,0,65,4,106,33,0,32,9,32,0,40,2,0,16,1,33,9,32,0,65,4,106,33,0,32,0,32,5,77,13,0,11,32,6,65,1,119,32,7,65,7,119,32,8,65,12,119,32,9,65,18,119,106,106,106,33,3,11,5,32,2,35,4,106,33,3,11,32,3,32,1,106,33,3,2,64,3,64,32,0,65,4,106,32,4,75,13,1,32,3,32,0,40,2,0,35,2,108,106,33,3,32,3,65,17,119,35,3,108,33,3,32,0,65,4,106,33,0,12,0,11,11,2,64,3,64,32,0,32,4,79,13,1,32,3,32,0,45,0,0,35,4,108,106,33,3,32,3,65,11,119,35,0,108,33,3,32,0,65,1,106,33,0,12,0,11,11,32,3,32,3,65,15,118,115,33,3,32,3,35,1,108,33,3,32,3,32,3,65,13,118,115,33,3,32,3,35,2,108,33,3,32,3,32,3,65,16,118,115,33,3,32,3,11,28,0,32,0,32,1,35,1,108,106,33,0,32,0,65,13,119,33,0,32,0,35,0,108,33,0,32,0,11,153,3,3,1,126,2,127,4,126,32,0,32,1,106,33,4,32,1,65,32,79,4,64,2,64,32,4,65,32,107,33,5,32,2,35,5,124,35,6,124,33,6,32,2,35,6,124,33,7,32,2,66,0,124,33,8,32,2,35,5,125,33,9,3,64,32,6,32,0,41,3,0,16,3,33,6,32,0,65,8,106,33,0,32,7,32,0,41,3,0,16,3,33,7,32,0,65,8,106,33,0,32,8,32,0,41,3,0,16,3,33,8,32,0,65,8,106,33,0,32,9,32,0,41,3,0,16,3,33,9,32,0,65,8,106,33,0,32,0,32,5,77,13,0,11,32,6,66,1,137,32,7,66,7,137,32,8,66,12,137,32,9,66,18,137,124,124,124,33,3,32,3,32,6,16,4,33,3,32,3,32,7,16,4,33,3,32,3,32,8,16,4,33,3,32,3,32,9,16,4,33,3,11,5,32,2,35,9,124,33,3,11,32,3,32,1,173,124,33,3,2,64,3,64,32,0,65,8,106,32,4,75,13,1,32,3,66,0,32,0,41,3,0,16,3,133,33,3,32,3,66,27,137,35,5,126,35,8,124,33,3,32,0,65,8,106,33,0,12,0,11,11,32,0,65,4,106,32,4,77,4,64,2,64,32,3,32,0,53,2,0,35,5,126,133,33,3,32,3,66,23,137,35,6,126,35,7,124,33,3,32,0,65,4,106,33,0,11,11,2,64,3,64,32,0,32,4,79,13,1,32,3,32,0,49,0,0,35,9,126,133,33,3,32,3,66,11,137,35,5,126,33,3,32,0,65,1,106,33,0,12,0,11,11,32,3,32,3,66,33,136,133,33,3,32,3,35,6,126,33,3,32,3,32,3,66,29,136,133,33,3,32,3,35,7,126,33,3,32,3,32,3,66,32,136,133,33,3,32,3,11,28,0,32,0,32,1,35,6,126,124,33,0,32,0,66,31,137,33,0,32,0,35,5,126,33,0,32,0,11,29,0,66,0,32,1,16,3,33,1,32,0,32,1,133,33,0,32,0,35,5,126,35,8,124,33,0,32,0,11,73,3,1,126,1,127,1,126,32,0,65,0,106,33,3,32,0,53,2,0,66,32,134,32,0,65,4,106,53,2,0,132,33,2,32,0,65,8,106,33,0,32,0,32,1,32,2,16,2,33,4,32,3,32,4,66,32,136,167,54,2,0,32,3,65,4,106,32,4,167,54,2,0,11]),e=new TextEncoder("utf-8");class n{constructor(){this.wasmInstance=WebAssembly.instantiate(t).then(t=>t.instance)}async h32(t,n=0){const s=e.encode(t);var r=(await this.wasmInstance).exports;const o=r.mem,i=r.xxh32;return this.writeBufferToMemory(s,o,0),(i(0,s.byteLength,n)>>>0).toString(16)}async h64(t,n=0,s=0){const r=e.encode(t);var o=(await this.wasmInstance).exports;const i=o.mem,f=o.xxh64;this.writeBufferToMemory(r,i,8);const a=new DataView(i.buffer);return a.setUint32(0,n,!0),a.setUint32(4,s,!0),f(0,r.byteLength),a.getUint32(0,!0).toString(16)+a.getUint32(4,!0).toString(16)}writeBufferToMemory(t,e,n){if(e.buffer.byteLength<t.byteLength+n){const s=Math.ceil((t.byteLength+n-e.buffer.byteLength)/65536);e.grow(s)}new Uint8Array(e.buffer,n).set(t)}}return n});
//# sourceMappingURL=xxhash-wasm.js.map

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc