UNPKG

inngest

Version:

Official SDK for Inngest.com. Inngest is the reliability layer for modern applications. Inngest combines durable execution, events, and queues into a zero-infra platform with built-in observability.

19 lines (17 loc) 535 B
//#region src/helpers/crypto.ts /** * Create a cryptographically secure random value. * * @throws {Error} If the crypto module is not available. */ function createEntropy(byteLength) { const bytes = new Uint8Array(byteLength); const { crypto } = globalThis; if (!crypto) throw new Error("missing crypto module"); if (!crypto.getRandomValues) throw new Error("missing crypto.getRandomValues"); crypto.getRandomValues(bytes); return bytes; } //#endregion exports.createEntropy = createEntropy; //# sourceMappingURL=crypto.cjs.map