pokedev.js is a standalone tool made to help developers get info about a pokemon and use it in any project with ease.
Install pokedev.js with npm
npm install pokedev.js
Install pokedev.js with yarn
yarn add pokedev.js
const { getPokemonByID, getPokemonByName, getPokemonRandom, getPokemonByType } = require("pokedev.js")
const run = async () => {
const pokemon = await getPokemonByID("032")
console.log(pokemon);
}
run();
{
name: 'Nidoran♂',
id: '032',
type: [ 'Poison' ],
forms: [
'https://www.serebii.net/swordshield/pokemon/032.png',
'https://www.serebii.net/Shiny/SWSH/032.png'
]
}
-
getPokemonByID(id)
: Fetching a pokemon by an id. -
getPokemonByName(name)
: Fetching a pokemon by a name. -
getPokemonByType(type)
: Fetching an array of pokemon by a type. -
getPokemonRandom()
: Fetching a random pokemon.