Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/luanmuniz/password-generator

:closed_lock_with_key: Yet another zero-depenceny password generator module
https://github.com/luanmuniz/password-generator

Last synced: about 1 month ago
JSON representation

:closed_lock_with_key: Yet another zero-depenceny password generator module

Awesome Lists containing this project

README

        

Password Generator
=========
[![Build Status][ci-image]][ci-url] [![NPM Version][npm-image]][npm-url] [![Coverage Status][coverrals-image]][coverrals-url]

A small library to generate random strings

## Installation

```shell
$ npm install --save @luanmuniz/password-generator
```

## How it works
```js
const generatePassword = require('@luanmuniz/password-generator').generate;

generatePassword({
size: 10,
numbers: 5,
symbols: 3,
allowUppercase: true,
allowRepetintion: true
});
//=> '23393Rz@}_'

generatePassword(20, {
numbers: 5,
symbols: 3,
allowUppercase: true,
allowRepetintion: true
});
//=> ';64xxy*DC6Zyt
Default: `15`

The total length of your string

##### numbers
Type: `Boolean or Integer`

Default: `5`

All Numbers allowed: `0123456789`

`true` or `false` if numbers are allowed

`Integers` for the numbers of numbers that your final password will have

##### symbols
Type: `Boolean or Integer`

Default: `5`

All Symbols allowed: `!@#$%&*()_+-={}[]:;<>?,./|`

`true` or `false` if numbers are allowed

`Integers` for the numbers of symbols that your final password will have

##### allowUppercase
Type: `Boolean`

Default: `true`

`true` or `false` if Uppercase characters are allowed

##### allowRepetintion
Type: `Boolean`

Default: `false`

`true` or `false` if your final password can have repetitive characters

## Tests
`npm test`

## Contributing
Please, check the [Contributing](CONTRIBUTING.md) documentation, there're just a few steps.

## Support or Contact

Having trouble? Or new ideas? Post a new issue! We will be glad to help you!

## License

[MIT License](http://luanmuniz.mit-license.org) © Luan Muniz

[ci-url]: https://github.com/luanmuniz/password-generator/actions/workflows/build
[ci-image]: https://github.com/luanmuniz/password-generator/actions/workflows/build.yml/badge.svg
[npm-image]: https://badge.fury.io/js/%40luanmuniz%2Fpassword-generator.svg
[npm-url]: https://npm.im/@luanmuniz/password-generator
[coverrals-image]: https://coveralls.io/repos/github/luanmuniz/password-generator/badge.svg?branch=master
[coverrals-url]: https://coveralls.io/github/luanmuniz/password-generator?branch=master