UNPKG

hydrogen-sanity

Version:
2 lines (1 loc) 517 B
"use strict";exports.a=function(t){return!!t&&"object"==typeof t&&"get"in t&&"function"==typeof t.get&&"set"in t&&"function"==typeof t.set&&"unset"in t&&"function"==typeof t.unset&&"commit"in t&&"function"==typeof t.commit},exports.h=function(t,n){let e=t;return n&&(e+=JSON.stringify(n)),async function(t){const n=await(new TextEncoder).encode(t),e=await crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(e)).map((t=>t.toString(16).padStart(2,"0"))).join("")}(e)};//# sourceMappingURL=utils.cjs.map