# webcrypto-random-int **Repository Path**: bddjr/webcrypto-random-int ## Basic Information - **Project Name**: webcrypto-random-int - **Description**: Like golang, get crypto random integer or bigint. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: https://www.npmjs.com/package/webcrypto-random-int - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-22 - **Last Updated**: 2024-04-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # webcrypto-random-int Like golang, get crypto random integer or bigint. ## NPM ``` npm i webcrypto-random-int --save-dev ``` ## Example ```js import CryptoRandInt from "webcrypto-random-int"; console.log("canIUse " + CryptoRandInt.canIUse); if (CryptoRandInt.canIUse) { console.log(CryptoRandInt.numInt(62)); console.log(CryptoRandInt.bigInt(2n ** 128n)); console.log(CryptoRandInt.str( 32, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" )); } ``` ``` canIUse true 53 216521706795757442119767567038153766458 SK2jwNqt3xvP1zuSwJt7CcxAI4T2GYbA ``` ## Test ``` npm -g i live-server npm run example ```