mini-id
Version:
A lightweight and customizable unique ID generator with zero collisions.
12 lines (11 loc) • 327 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRandomBytes = getRandomBytes;
const crypto_1 = require("crypto");
/**
* Generate random bytes securely.
* @param length - Number of bytes to generate.
*/
function getRandomBytes(length) {
return (0, crypto_1.randomBytes)(length);
}