pokerare
v0.1.1
Published
Pokemon Rarity Levels
Downloads
17
Maintainers
Readme
PokeRare
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 },
...
]