evolutions

    1.0.4 • Public • Published

    evolutions Build Status XO code style npm npm

    A cli tool to get pokemon evolution chain.

    NOTE - Only supports pokemons upto 6th generation as of now.

    Install

    To test, install globally:

    $ npm install -g evolutions
     
    $ evolutions
    torchic combusken blaziken
     
    $ evolutions 1 4
    bulbasaur ivysaur venusaur
    charmander charmeleon charizard
     
    $ evolutions eevee mudkip
    vaporeon jolteon flareon espeon umbreon leafeon glaceon sylveon
    mudkip marshtomp swampert

    To use in another module:

    $ npm install --save evolutions

    Usage

    const evolutions = require('evolutions');
     
    evolutions.random();
    //=> 'Snorlax'
     
    evolutions.getName(147);
    //=> 'Dratini'
     
    evolutions.getId('Dratini');
    //=> 147
     
    evolutions.exists('Moltres');
    //=> true
     
    evolution.getEvolutionChain('chimchar');
    //=> chimchar monferno infernape

    API

    .random(): string

    Returns a random pokemon name.

    .getName(id: number): string

    Get pokemon name form ID.

    .getId(name: string): number

    Get pokemon ID form name.

    .exists(name: string) boolean

    Check if the pokemon with a given name exists (not case sensitive).

    .getEvolutionChain(name: string): array

    Get an array containing the evolution chain of a pokemon.

    License

    MIT © Anshuman Verma

    Install

    npm i evolutions

    DownloadsWeekly Downloads

    0

    Version

    1.0.4

    License

    MIT

    Last publish

    Collaborators

    • anshumanv