Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

superheroes

sindresorhus4.2kMIT4.0.0TypeScript support: included

Get superhero names

word, words, list, array, random, superheroes, superhero, heroes, hero, marvel, dc, comics

readme

superheroes

Get superhero names

The list is just a JSON file and can be used anywhere.

I'm not accepting additional entries to the list.

Install

npm install superheroes

Usage

import superheroes from 'superheroes';

superheroes;
//=> ['3-D Man', 'A-Bomb', …]

API

superheroes

Type: string[]

Superhero names in alphabetical order.

randomSuperhero()

Type: Function

Get a random superhero name.

import {randomSuperhero} from 'superheroes';

randomSuperhero();
//=> 'Spider-Ham'