Package Exports
- name-my-unicorn
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (name-my-unicorn) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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.
Image: Walter Newton
Installation
$ npm install --save name-my-unicorn
How to use it
Property | Type | Example Output | Description |
---|---|---|---|
allFirst | array | ["Rainbow", "Silver", "Cupcake"] | outputs all possible first names |
allLast | array | ["Passion", "Striker", "Sprinkles"] | outputs all possible last names |
const nameMyUnicorn = require('name-my-unicorn');
const firstNames = nameMyUnicorn.allFirst;
console.log(firstNames);
// ["Rainbow", "Silver", "Cupcake"]
Method | Type | Example Output | Description |
---|---|---|---|
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