rndstr.js
Generate random string
Install
$ npm install rndstr --save
Usage
Example
const rndstr = ;; // ujvb17u5vxgqsh41mgwhlo3lfjrbz1xy2oi9zgxk7vh04r5p3cfc121fo8bkoj2j; // 9rx8ghughdlihe35l7uzld4f3gvwa0wm0cb21ousiiit7q2uvrixo331zcdkb8kj; // q1a334oio0t6sc5yqb2yjqmuym22acthfzhsnwrr67orp5hvjkj22r9fiehonly9// === Use custom options ===; // 51048708; // 80987908; // 72556885// === Specify seed ===; // Always m8ucpxibnp98qd8791hv98h1knfdypimztyfo3agu7gj757uyicjdea8wwyrpwab; // Always kybaq23mek8580s246kjkngupc9zsuyjuqgh6jkbale5btvtzssxjn2g6nienuyq// === Enable/Disable range-syntax parser ===; // sbywqwriyielxske; // az--a--zaa-a-aa-
Options
Property | Type | Description | Default |
---|---|---|---|
length | number | The length of your resulting string | 64 |
chars | string or string[] | The chars you want to include | 'a-z0-9' |
seed | string or number | The seed value to be used to generate | null |
parseRange | boolean | Whether a given chars be interpreted as a range-syntax | true |
On TypeScript
Type definition are bundled.
;