UNPKG

zeuge

Version:

zeuge creates permanence for the content behind web2 URIs

16 lines (12 loc) 311 B
import fetch from "cross-fetch"; import sha3 from "js-sha3"; export async function download(url) { const response = await fetch(url); return response.arrayBuffer(); } export function hash(buf) { return sha3.sha3_256(buf); } export async function identify(url) { return hash((await download(url))); }