superhero-name-library
v1.2.2
Published
Get random superhero names
Downloads
22
Readme
superhero-name-library
Installation
npm i superhero-name-library
Usage
const superhero = require('superhero-name-library')
API
superhero.random()
returns a random superhero namesuperhero.allNames()
returns an array containing all namessuperhero.allNames(n)
returns an array containing first 'n' namessuperhero.rawList
returns entire jsonsuperhero.getByInitialLetter(char)
returns an array containing all superhero names starting from char Eg: superhero.getByInitialLetter("x") ===> [ 'X-23', 'X-Man' ]superhero.getSuperHeroById(id)
returns a superhero with matching id (id should be a number between 1 - 731)