import { hash } from "https://deno.land/x/ayonli_jsext@v0.9.72/hash/web.ts";
Calculates the hash of the given data.
This function uses the same algorithm as the string-hash package, non-string data are converted to strings before hashing.
Examples
Example 1
Example 1
import hash from "@ayonli/jsext/hash";
console.log(hash("Hello, World!")); // 4010631688
console.log(hash(new Uint8Array([1, 2, 3]))); // 193378021
Parameters
data: BufferSource