pokerare

Pokemon Rarity Levels

Usage no npm install needed!

<script type="module">
  import pokerare from 'https://cdn.skypack.dev/pokerare';
</script>

README

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 },
  ...
]