pokemon-picker (npm)
🎨 Pick your Pokémon from Pokédex!
I always have a problem for new project name.
I had a simple idea to create random pokemon generator.
So I make this project to randomly select Pokémon.
I use bulbapedia.bulbagarden.net to get index, name and types.
ALL 756 Pokemons are available!
______ _____ ______
_________________ /_____________ ________________ ___________(_)________ /______________
___ __ \ __ \_ //_/ _ \_ __ `__ \ __ \_ __ \ ___ __ \_ /_ ___/_ //_/ _ \_ ___/
__ /_/ / /_/ / ,< / __/ / / / / / /_/ / / / / __ /_/ / / / /__ _ ,< / __/ /
_ .___/\____//_/|_| \___//_/ /_/ /_/\____//_/ /_/ _ .___//_/ \___/ /_/|_| \___//_/
/_/ /_/
After global installation:
npm install -g pokemon-picker
... you can CHOOSE random Pokémon by simple command:
pokemon-picker
... or print help with details:
pokemon-picker --help
Usage: pokemon-picker [options]
Pick your Pokémon from Pokédex!
Options:
-h, --help output usage information
-V, --version output the version number
-a Get whole list of Pokémons
-i [index] Get Pokémon by index
-n [name] Get Pokémon by name
-t [type] Get Pokémons by type
-r Return random Pokémon
-s Return number of database size
npm install pokemon-picker
var pokemon = require('pokemon-picker');
Returns list of Pokémons.
Return Pokémon object or undefined
value.
Parameters:
index
- number of create from the list.
Returns Pokémon object or undefined
value.
Parameters:
name
- Pokémon name.
Returns list of Pokémons with type.
Parameters:
type
- Pokémon type.
Return random "Pokémon" from whole list.
Return number of Pokémon's, which are available in database.
var pokemon = require('pokemon-picker');
pokemon.all() // ... returns whole list of Pokémons
pokemon.byIndex(0); // => { "index": 1, "name": "Bulbasaur", "types": ["Grass", "Poison"] }
pokemon.at(76); // => { "index": 76, "name": "Golem", "types": ["Rock", "Ground"] }
pokemon.byIndex(151); // => { "index": 151, "name": "Mew", "types": ["Psychic"] }
pokemon.byName("Pikachu"); // => { name: 'Pikachu', types: [ 'Electric' ], index: 25 }
pokemon.byType("Fire"); // => ... list of Fire Pokémons
pokemon.size() // 756 (all known creatures)
pokemon.randomize() // => { "index": 135, "name": "Electabuzz", "types": ["Electric"] }
pokemon.randomize() // => { "index": 65, "name": "Alakazam", "types": ["Psychic"] }
pokemon.randomize() // => { "index": 38, "name": "Ninetales", "types": ["Fire"] }
The MIT License @ 2014