4.0.7 • Published 4 months ago

pokedex2.js v4.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

pokedex2.js

A TypeScript wrapper for the PokeAPI, based on my Pokedex2 C# library.

Basic Usage

import dex from 'pokedex2.js'

dex("rayquaza-mega").then((pokemon) => {
    console.log(pokemon)
});

Documentation

Pokemon Class

name: string - Name of the Pokémon, used internally.

displayName: string - Display name of the Pokémon (e.g. "Mr. Mime").

species: string - The Pokémon's species.

generation: number - The Pokémon's originating Generation.

index: number - The species Pokedex ID.

apiIndex: number - The internal ID of the Pokémon in PokeAPI's database.

baby: boolean - Whether the Pokémon is a baby or not.

arctype: Arctype - The Arctype of the Pokémon.

formtype: FormType - The FormType of the Pokémon.

regional: Regional - The Regional form of the Pokémon.

types: string[] - The Pokémon's Typings.

forms: string[] - All the Pokémon's different forms.

eovlutions: string[] All of the evolutions available to the species.

getSprite(front: boolean = true, female: boolean = false, shiny: boolean = false): string? - Returns the sprite that matches the criteria, or undefined.

Arctype Enum

Arctype.Normal - "Normal" Pokémon.

Arctype.Mythical - Mythical Pokémon.

Arctype.Legendary - Legendary Pokémon.

Arctype.Ultrabeast - Ultrabeast Pokémon.

Arctype.Paradox - Paradox Pokémon.

FormType Enum

FormType.Default - Default form.

FormType.Mega - Mega form.

FormType.Primal - Primal form.

FormType.GMax - Gigantamax form.

FormType.Other - Other forms that are not the default.

Regional Enum

Regional.None - No regional variant

Regional.Alola - Alolan variant

Regional.Galar - Galarian variant

Regional.Hisui - Hisuian variant

Regional.Paldea - Paldean variant

4.0.5

4 months ago

4.0.4

4 months ago

4.0.7

4 months ago

4.0.6

4 months ago

4.0.1

4 months ago

4.0.0

4 months ago

4.0.3

4 months ago

4.0.2

4 months ago

2.6.1

2 years ago

2.6.0

2 years ago

2.6.2

2 years ago

3.1.0

2 years ago

2.5.0

3 years ago

2.5.2

3 years ago

2.5.1

3 years ago

2.4.1

3 years ago

2.3.2

3 years ago

2.4.2

3 years ago

2.3.3

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.2.2

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago