Skip to content

Commit

Permalink
update readme, add related repos
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Nov 10, 2015
1 parent a8725f3 commit 41a6f30
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 42 deletions.
17 changes: 6 additions & 11 deletions .verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

> {%= description %}
## Install
{%= include("install-npm", {save: true}) %}
{%= include("install-bower", {save: true}) %}

Expand All @@ -15,7 +16,7 @@ var randomize = require('{%= name %}');

## API

```
```js
randomize(pattern, length, options);
```

Expand Down Expand Up @@ -102,17 +103,11 @@ Define a custom string to be randomized.
_The order in which the characters are defined is insignificant._



## Running tests

Install dev dependencies:

```bash
npm install -d && mocha
```
## Related
{%= related(['repeat-string', 'pad-left', 'pad-right']) %}

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue]({%= bugs.url %})
{%= include("contributing") %}

## Author
{%= include("author") %}
Expand All @@ -123,4 +118,4 @@ Pull requests and stars are always welcome. For bugs and feature requests, [plea

***

{%= include("footer") %}
{%= include("footer") %}
56 changes: 25 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@

> Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters.
## Install with [npm](npmjs.org)
## Install

```bash
npm i randomatic --save
```
### Install with [bower](https://github.com/bower/bower)
Install with [npm](https://www.npmjs.com/)

```bash
bower install randomatic --save
```sh
$ npm i randomatic --save
```

Install with [bower](http://bower.io/)

```sh
$ bower install randomatic --save
```

## Usage

```js
var randomize = require('randomatic');
```


## API

```
```js
randomize(pattern, length, options);
```

- `pattern` **{String}**: The pattern to use for randomizing
- `length` **{Object}**: The length of the string to generate

* `pattern` **{String}**: The pattern to use for randomizing
* `length` **{Object}**: The length of the string to generate

### pattern

Expand All @@ -56,7 +56,6 @@ randomize('Aa0!', 10);
* `*`: All characters (all of the above combined)
* `?`: Custom characters (pass a string of custom characters to the options)


### length

> the length of the string to generate
Expand All @@ -78,11 +77,10 @@ If `length` is left undefined, the length of the pattern in the first parameter

These are just examples, [see the tests](./test.js) for more use cases and examples.



## options

#### chars

Type: `String`

Default: `undefined`
Expand All @@ -94,8 +92,6 @@ 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`.



## Usage Examples

* `randomize('A', 4)` (_whitespace insenstive_) would result in randomized 4-digit uppercase letters, like, `ZAKH`, `UJSL`... etc.
Expand All @@ -109,30 +105,28 @@ Define a custom string to be randomized.

_The order in which the characters are defined is insignificant._

## Related


## Running tests

Install dev dependencies:

```bash
npm install -d && mocha
```
* [pad-left](https://www.npmjs.com/package/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-left)
* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right)
* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string)

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/randomatic/issues)

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/randomatic/issues/new).

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license

Copyright © 2015 Jon Schlinkert
Released under the MIT license.

***

_This file was generated by [verb](https://github.com/assemble/verb) on January 26, 2015._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 10, 2015._

0 comments on commit 41a6f30

Please sign in to comment.