Skip to content

Commit

Permalink
update example and documentation to show usages of exclude option
Browse files Browse the repository at this point in the history
  • Loading branch information
doowb committed Aug 8, 2018
1 parent 8d742a1 commit cad4d38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,16 @@ Define a custom string to be randomized.
* `randomize('?', 20, {chars: 'jonschlinkert'})` will generate a 20-character randomized string from the letters contained in `jonschlinkert`.
* `randomize('?', {chars: 'jonschlinkert'})` will generate a 13-character randomized string from the letters contained in `jonschlinkert`.

#### exclude
Type: `String|Array`

Default: `undefined`

Specify a string or array of characters can are excluded from the possible characters used to generate the randomized string.

**Example:**

* `randomize('*', 20, { exclude: '0oOiIlL1' })` will generate a 20-character randomized string using all of possible characters except for `0oOiIlL1`.

## Usage Examples

Expand Down
4 changes: 4 additions & 0 deletions examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ function parse(args) {
});
}

console.log();
console.log(rand('*', 20, { exclude: '0oOiIlL1' }));
console.log();

// function parse(args) {
// return args.map(function(arg) {
// if (/\{/.test(arg)) {
Expand Down

0 comments on commit cad4d38

Please sign in to comment.