1.1.9 • Published 6 years ago

simple-randstring v1.1.9

Weekly downloads
6
License
ISC
Repository
github
Last release
6 years ago

Image of travis-ci

simple-randstring

Create random strings fast

Usage:

import { randomString } from 'simple-randstring'

// Use Math.random() to create random strings, fast but not secure
// Default charset is [0-9a-zA-Z]
randomString(30)

// Use window.crypto( on the browser ) or crypto( on node ) to create random strings
// The speed is only half compare to Math.random() but it is more secure
// If window.crypto is not supported , it will fall back to use Math.random()
randomString(30, true)
import { randomString, setRandCharset } from 'simple-randstring'

// Define your own charset
setRandCharset('abcdefg()!@#$%')

// Return something like ')ag)(#fbe@!a%g%$g(b#'
randomString(20, true)
1.1.9

6 years ago

1.1.8

7 years ago

1.1.5

7 years ago

1.2.0

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago