nonce-str

Generate a nonce string.

Usage no npm install needed!

<script type="module">
  import nonceStr from 'https://cdn.skypack.dev/nonce-str';
</script>

README

Build Status Coverage

nonce-str

Generate a nonce str.

Install

$ npm i nonce-str

nonce(length = 32, chars = nonce.CHARS)

Returns String

import nonce, {CHARS} from 'nonce-str'

nonce(32)
// mq3GTllnJ0tMxLGeV0EoO8ZDIOjQX6td

console.log(CHARS)
// ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789

License

MIT