JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q77518F
  • License MIT

A better, easier, and CommonJS compatible library that allows you to fetch, display, and control how you fetch pokemons.

Package Exports

  • pokeapi-enhanced

Readme

NPM NodeJS TypeScript JavaScript

pokeapi-enhanced

A better suitable PokeAPI wrapper for Node projects using CommonJS, also including support for Typescript

Installation Guide:

npm install pokeapi-enhanced

Usage:

import Pokedex from 'pokeapi-enhanced';

const  dex  =  new  Pokedex('pikachu');
const  entry  =  await  dex.getPokemon();

const  heldItem  =  entry?.held_items?.[0].item;
const  pastType  =  entry?.past_types?.[0]?.types?.[0]?.type?.name;

Always make sure that you check the API docs for reference.
Some pokemons might not have some properties and will display as null or undefined.