This repository has been archived on 2026-05-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
novarix-networks-homepage/node_modules/next/dist/server/node-polyfill-crypto.js
T
Kismet Hasanaj 34dc9aec52 .
2026-05-02 20:07:02 +02:00

21 lines
558 B
JavaScript

// Polyfill crypto() in the Node.js environment
"use strict";
if (!global.crypto) {
let webcrypto;
Object.defineProperty(global, 'crypto', {
enumerable: false,
configurable: true,
get () {
if (!webcrypto) {
// @ts-expect-error -- TODO: Is this actually safe?
webcrypto = require('node:crypto').webcrypto;
}
return webcrypto;
},
set (value) {
webcrypto = value;
}
});
}
//# sourceMappingURL=node-polyfill-crypto.js.map