0.1.0 • Published 4 years ago

passwordly v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Passwordly

Passwordly is a simple password generator. It can generate random or word-based strings with a variety of options.

Installation

npm i passwordly --save

How to use

const passwordly = require('passwordly');

passwordly('string', {
    uppercase: true,
    lowercase: true,
    digits: true
});

// Sample output: [ 'oIjENySr6eDN' ]

passwordly('string', {
    uppercase: true,
    lowercase: true,
    digits: true,
    suffix: true
});

// Sample output: [ 'YBpGsg36CVJT-3859' ]

passwordly('string', {
    uppercase: true,
    lowercase: true,
    digits: true,
    count: 3
});

// Sample output: [ 'NOBroeayPM9T', 'F3Az0Bab3sxm', '4opbY84VjlBS' ]

passwordly('string', {
    uppercase: true,
    lowercase: true,
    digits: true,
    symbols: true,
    count: 1,
    len: 32
});

// Sample output: [ '%lyydPQpVEj6@OV!aTg@we4yIhz#yPVj' ]

passwordly('word', {
    wordlist: [
      'romantic', 'eliminate', 'communication', 'automatic',
      'management', 'replace', 'shallow', 'outside',
      'discreet', 'allowance', 'training', 'appearance',
      'important', 'topple', 'exaggerate', 'suspect',
      'suspicion', 'conscience', 'castle', 'pleasant'
    ]
});

// Sample output: [ 'Suspect-Castle-Romantic' ]

passwordly('word', {
    wordlist: [
      'romantic', 'eliminate', 'communication', 'automatic',
      'management', 'replace', 'shallow', 'outside',
      'discreet', 'allowance', 'training', 'appearance',
      'important', 'topple', 'exaggerate', 'suspect',
      'suspicion', 'conscience', 'castle', 'pleasant'
    ],
    count: 5,
    numberOfWords: 2,
    suffix: true
});

// Sample output: [
//   'Romantic-Management-2544',
//   'Outside-Important-9117',
//   'Exaggerate-Management-2972',
//   'Communication-Suspect-4402',
//   'Training-Exaggerate-6006'
// ]

Options

PropertyTypeValues
uppercasebooleandefault: false
lowercasebooleandefault: false
digitsbooleandefault: false
symbolsbooleandefault: false
prefixbooleandefault: false
suffixbooleandefault: false
lenintdefault: 12
countintdefault: 1
numberOfWordsintdefault: 3
useDelimiterbooleandefault: true
delimiterstringdefault: '-'
wordlistarray[]
capitalizationstringcamelcase (default), uppercase, lowercase