1.0.0 • Published 9 years ago

mempass v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

mempass

A configurable generator for memorable passphrases

CLI

mempass is the CLI command, run npm i -g mempass to use it in the command line

Examples:

$ mempass -s = -t allcaps

 METHANOL=TODDED=BROWNOUT

$ mempass 4 -s + -t randomcaps

 DITT+syntexis+tithing+BARRATOR

$ mempass 2 -s "<>" -t capitalize

 paterae<>rebraced

Usage:

$ mempass [words] [options]...

words is an optional number specifying the number of words in the passphrase

Options

Note: not case-sensitive

CommandDescription
-s, --separatorSymbol to use to separate the individual words (" " for space)
-b, --beginningNumbersAmount of digits to insert before the phrase
-e, --endingNumbersAmount of digits to append to the phrase
-t, --transformTranformation of the words, see list below
--min, --minLengthThe minimum length of each word (0 for anything)
--max, --maxLengthThe maximum length of each word (0 for anything)

Transforms

Note: not case-sensitive

NameExample
nonewhatevers-in-Dictionary
lowerall-lower-case
everyOTHERcapsevery-OTHER-word-IS-caps
CapitalizeFirst-Letter-Is-Capitalized
rEVERSEcAPITALIZEfIRST-lETTER-iS-lOWERCASE
ALLCAPSEVERY-LETTER-CAPITALIZED
randomCAPSrandom-words-ARE-capitalized

API

You can use mempass programmatically

Install as a dependency with npm i -s mempass

var mempass = require("mempass")

// generates and returns a passphrase as a string
// possible options are in mempass.defaults
mempass.generate(options?)

// contains the default options object
mempass.defaults = {

  words: 3,
  minLength: 4,
  maxLength: 8,
  separator: "-",
  beginningNumbers: 0,
  endingNumbers: 0,
  transform: "lower" // case insensitive

}

// contains the default transforms, detailed above
mempass.transforms