@krisell/random

1.1.1 • Public • Published

Generate random data – Not for cryptographic purpose

Installation

npm install @krisell/random

How to use

import Random from '@krisell/random'

Random.randomString() // Gives a random 20 character long string
Random.randomString(30) // Gives a random 30 character long string
Random.randomDigits(4) // Gives a random 4 digit code
Random.integerBetween(12, 36) // Gives random integers in the interval [12, 36], i.e. including 12 and 36

The intended distribution is uniform (all outcomes equally likely), but the used random function is not cryptographically secure. Do not use this for chryptographic purposes.

Readme

Keywords

none

Package Sidebar

Install

npm i @krisell/random

Weekly Downloads

15

Version

1.1.1

License

MIT

Unpacked Size

6.19 kB

Total Files

7

Last publish

Collaborators

  • krisell