@rnd7/rum-random-string
v1.0.2
Published
Generates random strings.
Downloads
3
Readme
rum-random-string
Rumbullion random string generator
See also:
Download
Installation
npm i @rnd7/rum-random-string
Include
Via script tag
<script src="node_modules/@rnd7/rum-random-string/dist/rum-random-string-browser.js"></script>
Using require
const randomString = require('@rnd7/rum-random-string').randomString
Using import
import { randomString } from '@rnd7/rum-random-string'
Usage
console.log(randomString())
console.log(randomString(8))
console.log(randomString(8, "0123456789"))
API
Defaults
export const RANDOM_STRING_DEFAULTS = {
length: 16,
charset: "abcdefghijklmnopqrstuvwxyz1234567890"
}
randomString
randomString(length, charset)
Development
Installation
Install dependencies such as rum-maker and rum-publisher
npm install
Build
Production build
npm run build
Publish
Publish to github and npm using
npx publish-rum -m "My commit message"
License
See the LICENSE file for software license rights and limitations (MIT).