insberr / random

Generates random things. Not maintained at the moment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

random | Random generator and more
Status: Working Progress

Repo Size Total alerts Language grade: JavaScript

random

Random generator and more

Documentation (Not set up yet)

Random Generators

Unchecked boxes are planned but not worked on features. More features to comes as time goes on.

  • Integer
  • Float
  • String
  • Character
  • Word
  • HEX color (Working Progress)
  • Time (Working Progress)
  • Date (Working Progress)
  • Day
  • Month

Random Selection

  • Shuffle Arrays
  • Choose random item from array

Setup

Requires NodeJS v14 or higher. This module was created in NodeJS v14.13.1

Require

const random = require('@spidergaming/random');

Examples:

Generate a random number

random.number(min?, max?, not?)

// Get a random integer between 0 and 1
console.log(`Random 0 - 1: ${random.number()}`);

// Get a random integer between 0 and 4
console.log(`Random 0 - 4: ${random.number(4)}`);

// Get a random integer between 50 and 100
console.log(`Random 50 - 100: ${random.number(50, 100)}`);

// Get a random number between 0 and 5 that is not 3
console.log('0 - 5 not 3:', random.number(0, 5, 3));

For almost all functions, check out src/tests/test.js

Maintainers

License

random is released under the MIT License. Read here for more information.

About

Generates random things. Not maintained at the moment.

License:MIT License


Languages

Language:JavaScript 100.0%