1.0.1 • Published 2 years ago
pokemon-moves-fetcher v1.0.1
Pokemon Moves Fetcher
A command line interpreter npm package that allows you to retrieve a specified number of moves for a Pokemon based on its name.
Installation
You can install the package globally using npm:
npm install -g pokemon-moves-fetcher
Usage
After installing the package, you can use it from the command line as follows:
pokemon-moves-fetcher
This command will prompt you to enter the name of a Pokemon and the number of moves you want to retrieve. Once you provide the inputs, the package will retrieve and display the specified number of moves for that Pokemon.
Example
$ pokemon-moves-fetcher
? Enter Pokemon's name to retrieve its moves: pikachu
? Enter number of moves to retrieve: 3
Moves for Pikachu:
- growl
- surf
- fly
API
The package does not provide a public API. However, you can access the underlying functions in your own code by requiring the module:
const { printMoves } = require("pokemon-moves-fetcher");
printMoves(pokemonName, movesRange)
This function retrieves the specified number of moves for a Pokemon based on its name.
pokemonName
(string): The name of the Pokemon.movesRange
(number, optional): The number of moves to retrieve. Default value is 5.