Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/hash/web.js>hash

A JavaScript extension package for building strong and modern applications.
Latest
function hash
import { hash } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/hash/web.js";

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

import hash from "@ayonli/jsext/hash";

console.log(hash("Hello, World!")); // 4010631688
console.log(hash(new Uint8Array([1, 2, 3]))); // 193378021