starwars-character-names
v3.0.0
Published
Get random starwars character names
Downloads
4
Readme
starwars-character-names
Library for getting starwars character names by different search criteria
Installing
npm install --save starwars-character-names
Usage
// require module
var starWarsNames = require('starwars-character-names');
// returns an array of all names
var allNames = starWarsNames.filter.all;
// returns single random name
var randomName = starWarsNames.filter.random();
// returns an array of n number of names
var fourNames = starWarsNames.filter.random(number);
// returns array of names with the first name beginning with user defined char
var firstNamesByChar = starWarsNames.filter.byFirstCharOfFirstName(char);
// returns array of names with the second name beginning with user defined char
var secondNamesByChar = starWarsNames.filter.byFirstCharOfSecondName(char);