npm.io
0.0.8 • Published 6 years ago

random-org-http

Licence
MIT
Version
0.0.8
Deps
4
Size
15 kB
Vulns
0
Weekly
0

random-org-http

Random.org via HTTP Interface

Requirements

  • Node ≥ 8.9.0

Usage

Random Integers
import {integers} from 'random-org-http'

const result = await integers({
  min: -128,
  max: 127,
  num: 9
})

console.log(result)

This will print an array of 9 random integers within range [1, 32].

Random Ordered Sequence
import {sequences} from 'random-org-http'

const result = await sequences({
  min: -20,
  max: 100
})

console.log(result)

This will print an array of all integers within range [10, 100] in random order.

Random Strings
import {strings} from 'random-org-http'

const result = await strings({
  num: 7,
  len: 12,
  unique: false,
  digits: false,
  upperalpha: true,
  loweralpha: false
})

console.log(result)

This will print an array of 7 random strings consist of 12 uppercase characters.

License

MIT Hoàng Văn Khải

Keywords