Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/superheroes
Get superhero names
https://github.com/sindresorhus/superheroes
Last synced: about 1 month ago
JSON representation
Get superhero names
- Host: GitHub
- URL: https://github.com/sindresorhus/superheroes
- Owner: sindresorhus
- License: mit
- Created: 2015-05-11T11:00:55.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T11:28:40.000Z (about 1 year ago)
- Last Synced: 2024-04-13T19:55:49.830Z (7 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 233
- Watchers: 7
- Forks: 26
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-nodejs-cn - superheroes - 获取超级英雄的名字 (包 / 怪诞的)
- awesome-nodejs-cn - superheroes - **star:233** 得到超级英雄的名字 (包 / 奇怪的)
- awesome-nodejs - superheroes - Get superhero names. (Packages / Weird)
- awesome-nodejs - superheroes - Get superhero names - ★ 188 (Weird)
- awesome-node - superheroes - Get superhero names. (Packages / Weird)
README
# superheroes
> Get superhero names
The list is just a [JSON file](superheroes.json) and can be used anywhere.
**I'm not accepting additional entries to the list.**
## Install
```sh
npm install superheroes
```## Usage
```js
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.
```js
import {randomSuperhero} from 'superheroes';randomSuperhero();
//=> 'Spider-Ham'
```## Related
- [superheroes-cli](https://github.com/sindresorhus/superheroes-cli) - CLI for this module
- [supervillains](https://github.com/sindresorhus/supervillains) - Get supervillain names
- [cat-names](https://github.com/sindresorhus/cat-names) - Get popular cat names
- [dog-names](https://github.com/sindresorhus/dog-names) - Get popular dog names
- [pokemon](https://github.com/sindresorhus/pokemon) - Get Pokémon names
- [superb](https://github.com/sindresorhus/superb) - Get superb like words
- [yes-no-words](https://github.com/sindresorhus/yes-no-words) - Get yes/no like words