pokedev.js
pokedev.js is a tool make to help developers get info about a pokemon and use it in any project with ease.
Quick Links
Installation
Install pokedev.js with npm
npm install pokedev.js
Install pokedev.js with yarn
yarn add pokedev.js
Code Example
const { getPokemonByID, getPokemonByName, getPokemonRandom, getPokemonByType } = require("pokedev.js")
const run = async () => {
const pokemon = await getPokemonByID("032")
console.log(pokemon);
}
run();
Console output
{
name: 'Nidoran♂',
id: '032',
type: [ 'Poison' ],
forms: [
'https://www.serebii.net/swordshield/pokemon/032.png',
'https://www.serebii.net/Shiny/SWSH/032.png'
]
}
Methods
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.