@denox/nhash
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

nhash

Non-cryptographic hash function wrapper. Currently supporting FNV-1a with hex and BigInt output.

Importing in Deno

import hash from "https://deno.land/x/nhash/mod.ts";

Importing in Node

import hash from "@denox/nhash";

Basic usage

hash("🦄🌈", { size: 32 }).hex();
//=> "aaf5fee7"

hash("🦄🌈", { size: 128 }).hex();
//=> "0a25841ae4659905b36cb0d359fad39f"

hash("🦄🌈", { size: 32 })).valueOf();
//=> 2_868_248_295

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @denox/nhash

Weekly Downloads

8

Version

0.1.0

License

MIT

Unpacked Size

7.07 kB

Total Files

11

Last publish

Collaborators

  • claudiuandrei