suggest-username

0.1.2 • Public • Published

suggest-username Build Status Coverage Status

The Teeny Username Generator

Install

$ npm install --save suggest-username

Usage

API

Basic

const suggestUsername = require('suggest-username');
 
suggestUsername().then(username => {
    console.log(username);
});
//  Output example:
//  $ supersonic macebearer
//

Advanced

const suggestUsername = require('suggest-username');
 
suggestUsername(2, '.', 'randomLetters').then(username => {
    console.log(username);
});
//  Output example:
//  $ supersonic.macebearer.XcGvTt
//

CLI

Usage
$ suggest-username --help

  Options
    -n, --number-of-words  Number of random words generated [Default: 2]
    -g, --glue			   Used to join generated words [Default: ' ']
    -a, --append 		   [l|n] Append random [l]etters or [n]umbers to username [Default: '']
    --version 			   Installed software version
    --help 				   This help menu

Examples

Basic:
$ suggest-username
$ supersonic macebearer

Advanced:
$ suggest-username -n 2 -g . -a l
$ supersonic.macebearer.XcGvTt

API

suggestUsername(numberOfWords, glue, append)

numberOfWords

Type: integer

Default: 2

The number of random words generated.

glue

Type: string

Default: ' '

Used to join the generated words together.

append

Type: string

Default: ''

Enum
randomNumbers
randomLetters

Optionally append random letters of numbers.

Sources

Dictionary files: WordNet Princeton University "About WordNet." WordNet. Princeton University. 2010. http://wordnet.princeton.edu

License

MIT © Miles Nash

Package Sidebar

Install

npm i suggest-username

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • milesnash