expanse-names
v1.7.0
Published
A little learning library based off of https://github.com/kentcdodds/starwars-names
Downloads
5
Readme
expanse-names
There is no good reason to use this...
...unless you really like The Expanse series by James S.A. Corey and you want to use his characters's names for something. A silly library for learning things based off of https://github.com/kentcdodds/starwars-names from https://egghead.io/courses/how-to-write-an-open-source-javascript-library
API
Install
npm install --save expanse-names
Require
const expanseNames = require('expanse-names);
'all' property
console.log(expanseNames.all)
/*
"Adolphus Murtry",
"Anderson Dawes",
"Antony Dresden",
...
*/
'random(number=1)' method
If used without passing a value or passing one, will return the name of a single character from the book series:
console.log(expanseNames.random())
// "Antony Dresden"
console.log(expanseNames.random(1))
// "Sematimba"
If number is > 1, it returns an array of series character names
console.log(expanseNames.random(3))
// ["Julie Mao","Josephus Miller","Monica Stuart",]