0.1.0 โ€ข Published 2 years ago

@denox/nhash v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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