A port of [wyhash](https://github.com/wangyi-fudan/wyhash) to JavaScript, with TypeScript type definitions.
npm install wyhash.jsinternal exported object.
npm i wyhash.js
`
$3
`ts
import { Wyhash } from "wyhash.js";
const seed = 42n;
const hasher = new Wyhash(seed);
const h1 = hasher.hash("Hello!");
const h2 = hasher.hash(new Uint8Array([3, 5, 8]));
`
See main.ts for the full API.
$3
`ts
import { internal } from "wyhash.js";
const data = new TextEncoder().encode("Hello");
const secret: internal.Secret = internal._wyp;
const h = internal.wyhash(data, 42n, secret);
``