Get Pokémon names
$ npm install pokemon
const pokemon = require('pokemon');
pokemon.all();
// ['Bulbasaur', …]
pokemon.random();
// 'Snorlax'
pokemon.getName(147);
// 'Dratini'
pokemon.getId('Dratini');
// 147
Get all Pokémon names as a string[]
.
Type: string
Default: 'es'
Language code to retrieve the list of Pokémon for.
pokemon.all();
// ['Bulbasaur', …]
pokemon.all('es');
// ['Pikachu', …]
Get random Pokémon name.
Type: string
Default: 'es'
Language code to retrieve the Pokémon for.
pokemon.random();
// 'Vigoroth'
pokemon.random('es');
// 'Muntier'
Get Pokémon name from ID.
Type: number
The ID of a Pokémon, retrieved via getId()
.
Type: string
Default: 'es'
Language code to retrieve the Pokémon for.
pokemon.getName(100);
// 'Voltorb'
pokemon.getName(100, 'es');
// 'Voltobal'
Get Pokémon ID from name.
Type: string
The Pokémon name in the language
locale.
Type: string
Default: 'es'
Language code of the localized name.
pokemon.getId('Snorlax');
// 143
pokemon.getId('Relaxo', 'es');
// 143
pokemon.languages.has('ja');
// true
Pokémon names are available for the following languages:
-
de
(German) -
en
(English) -
fr
(French) -
es
(Spanish) -
ja
(Japanese) -
ko
(Korean) -
ru
(Russian) -
th
(Thai) -
zh-Hans
(Simplified Chinese) -
zh-Hant
(Traditional Chinese)
The language codes follow the IETF BCP 47 standard.