Skip to content

Commit

Permalink
fix(docs): readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabb-c committed Jul 1, 2021
1 parent c32c574 commit 5d746b0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ A lightweight Node.js wrapper for the PokéAPI with built-in types. An easy way

```bash
npm i pokenode-ts

# or

yarn add pokenode-ts
yarn add pokenode-ts # Recommended
```

## Basic Example
Expand All @@ -37,7 +35,7 @@ const api = new PokemonClient();
const pokemon = await api
.getPokemonByName('luxray')
.then((data) => data)
.catch((error) => console.log(error));
.catch((error) => console.error(error));

console.log(pokemon.name); // will output 'Luxray'
```
Expand All @@ -51,7 +49,7 @@ const api = new MainClient();

const pokemon = await api.pokemon
.getPokemonByName('luxray')
.then((response) => response)
.then((data) => data)
.catch((error) => console.error(error));

console.log(pokemon.name); // will output 'Luxray'
Expand Down

0 comments on commit 5d746b0

Please sign in to comment.