1.0.0 • Published 6 years ago

name-my-unicorn v1.0.0

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

name-my-unicorn 🦄

🦄 Randomly generate partial or full names for your unicorn

name-my-unicorn is library of names that are suitable for naming magical creatures. The library is exported as an object with several properties and methods.

unicorn gif

Image: Walter Newton

Installation

$ npm install --save name-my-unicorn

How to use it

PropertyTypeExample OutputDescription
allFirstarray"Rainbow", "Silver", "Cupcake"outputs all possible first names
allLastarray"Passion", "Striker", "Sprinkles"outputs all possible last names
const nameMyUnicorn = require('name-my-unicorn');
const firstNames = nameMyUnicorn.allFirst;
console.log(firstNames);
// ["Rainbow", "Silver", "Cupcake"]
MethodTypeExample OutputDescription
getFirst()string"Rainbow"outputs a single string from list of first names
getLast()string"Passion"outputs a single string from a list of last names
createName()string"Rainbow Passion"outputs a single string that represents a randomly generated first and last name
let fullName = nameMyUnicorn.createName();
console.log(fullName);
// "Rainbow Passion"

fullName = nameMyUnicorn.createName();
console.log(fullName);
// "Silver Rocket"

License

MIT © 2018 Hong Le