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

x/ayonli_jsext/esm/workerd/hash.js>default

A JavaScript extension package for building strong and modern applications.
Latest
function default
import { default } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/workerd/hash.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