🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

advanced-random

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

advanced-random

Module for getting random values from random.org

1.0.2
Source
npm
Version published
Weekly downloads
7
133.33%
Maintainers
1
Weekly downloads
 
Created
Source

Technically it is just wrapper for random.org API service.

Installation

npm install --save advanced-random

Usage

Simple usage example

const random = require('advanced-random');

random.integerGenerator().then(console.log).catch(console.log);
random.sequenceGenerator().then(console.log).catch(console.log);
random.stringGenerator().then(console.log).catch(console.log);
random.quotaChecker().then(console.log).catch(console.log);

Integer Generator

//...
random.integerGenerator({
  num: 15,
  min: -1e8,
  max: 148,
  base: 16,
  rnd: 'new'
}).then(console.log).catch(console.log);

Sequence Generator

//...
random.sequenceGenerator({
  min: 1,
  max: 2,
  rnd: 'new'
}).then(console.log).catch(console.log);

String Generator

random.stringGenerator({
  num: 1,
  len: 19,
  digits: 'on',
  upperalpha: 'on',
  loweralpha: 'on',
  unique: 'on',
  rnd: 'new'
}).then(console.log).catch(console.log);

Quota Checker

//...
random.quotaChecker({
  ip: '127.0.0.1'
}).then(console.log).catch(console.log);

Visit https://www.random.org/clients/http/ for more detailed information.

Keywords

random

FAQs

Package last updated on 04 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts