random-org-http

Random.org via HTTP Interface

Usage no npm install needed!

<script type="module">
  import randomOrgHttp from 'https://cdn.skypack.dev/random-org-http';
</script>

README

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