Secure Password Generator With Pure JavaScript – Secrets

Category: Javascript | February 2, 2018
Author:hellotoby
Views Total:151 views
Official Page:Go to website
Last Update:February 2, 2018
License:MIT

Preview:

Secure Password Generator With Pure JavaScript – Secrets

Description:

Secrets is a small and easy JavaScript Secure Password Generator that randomly generates complex password strings with optional numeric and/or special characters.

How to use it:

Install the Secrets library via NPM or Yarn:

# Yarn
$ yarn add @hellotoby/secrets
# NPM
$ npm install @hellotoby/secrets --save

Import the library into your project.

// ES 6
import Secrets from '@hellotoby/secrets';
// CommonJS:
const Secrets = require('@hellotoby/secrets');

Create a new instance with the following parameters:

  • length: the number of characters to generate
  • numeric: includes numeric characters
  • special: includes special characters
// length = 32, numeric = true, special = true
const secret = new Secrets(8, true, false)

You Might Be Interested In:


Leave a Reply