An open API service indexing awesome lists of open source software.

https://github.com/letiantian/random-password

Generate random password.
https://github.com/letiantian/random-password

Last synced: 3 months ago
JSON representation

Generate random password.

Awesome Lists containing this project

README

          

# random-password

Generate random password.

## Install
```
$ npm install random-password --save
```

## Example

The length of password should be gived:
```js
var generator=require('random-password');

generator(4); // 'WA6n'

generator(10); // '49Pm!N&i9M'
```

The table to generate password could be specified:
```js
generator(4, '1234567890'); // '5575'

generator(10, '1234567890'); // '1926972366'

```

If length is `Nan`, `Infinity` or `-Infinity`, the default length `8` will be used:
```js
generator(NaN); //'0vpgip!G'
```

## License

MIT