pokerare

0.1.1 • Public • Published

PokeRare NPM Version

Get rarity levels of Gen I pokemons.

Install

$ npm install --save pokerare

Usage

const rare = require("pokerare");
 
rare.getRarity(150); // pkmn object with id and rarity level
rare.getPkmnByRarity(255, 255); // array of most common pkmn

API

.getRarity(id: number) => object

Get rarity of a pokemon by its national dex id.

rare.getRarity(150);

Result:

{
  id: 150,
  rarity: 3
}

.getPkmnByRarity(from: number, to: number) => array

Get pokemon from rarity range.

rare.getPkmnByRarity(255, 255);

Result:

[
  { id: 10, rarity: 255 },
  { id: 13, rarity: 255 },
  { id: 16, rarity: 255 },
  ...
]

Package Sidebar

Install

npm i pokerare

Weekly Downloads

4

Version

0.1.1

License

MIT

Last publish

Collaborators

  • maierfelix