npm i superhero-name-library
const superhero = require('superhero-name-library')
-
superhero.random()returns a random superhero name -
superhero.allNames()returns an array containing all names -
superhero.allNames(n)returns an array containing first 'n' names -
superhero.rawListreturns entire json -
superhero.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)