namebot

A node.js module for generating usernames based on a specified corpus.

Namebot

npm install namebot
var namebot = require('namebot');
 
namebot({
    base:           ['badger', 'panda']
}, function (erra) {
    console.log(a);             // Win! 
});
var namebot = require('namebot');
 
namebot({
    base:           'http://domain.com/path/to/base.json',
    dictionary:     './path/to/dictionary.dict',
    method:         ['rhyme'],
    count:          10
}, function (erra) {
    console.dir(a);             // Win! 
});
npm install -g namebot

namebot --base "['mega', 'shark', 'giant', 'octopus']" --count 25

An array of words that form the basis for names. All names generated will include a word from this object. Can be specified as a local path or as a HTTP GET request to a JSON resource by passing along a URL string.

A phonetic dictionary (see CMUdict for reference). Can be specified as a local path or as a HTTP GET request to a resource by passing along a URL string.

An array of naming methods that will be used by the generator. Will default to use all available options if not set. Currently only supports two options:

  • Rhyme
  • Random

*Note: Regardless of the method options, namebot will use the random method to generate a name if a rhyming pair can not be found.

Number of names that will be generated. Will default to one (1) if not set.

The rhyming method for namebot was derived from James Halliday's node-rhyme module.

npm test