node
It can also be used in Node.jsย
npm install randBox
or if youโre using yarnย
yarn add randBox
then in your app
// Load RandBox
var RandBox = require("randBox");
// Instantiate RandBox so it can be used
var randBox = new RandBox();
// Use RandBox here.
var my_random_string = randBox.string();
Or if youโre using ES6
// Load RandBox
import RandBox from "randBox";
// Instantiate RandBox so it can be used
const randBox = new RandBox();
// Use RandBox here.
const my_random_string = randBox.string();
As of version 0.5.5, the following is also offered as a convenience for getting an instance of RandBox
// Load and instantiate RandBox
var randBox = require("randBox").RandBox();
// Use RandBox here.
var my_random_string = randBox.string();
Last updated on: