1.7.0 • Published 6 years ago

pokemon-names-and-types v1.7.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

pokemon-names-and-types

travis build codecov downloads semantic-release version Codacy Badge

MIT License

An open source project created as practice for the egghead.io course - https://egghead.io/courses/how-to-write-an-open-source-javascript-library Pokemon

Pokemon Names

Get a all Pokemon names

import {pkmn} from 'pokemon-names-and-types'
pkmn.all //Returns all pokemon names as a json array

Get a random Pokemon name

import {pkmn} from 'pokemon-names-and-types'
pkmn.random() //Returns a random pokemon

Get n Pokemon names

import {pkmn} from 'pokemon-names-and-types'
pkmn.random(n) //Returns n random pokemon

Pokemon Types

Get type to which another is weak to

import {pkmnTypes} from 'pokemon-names-and-types'
pkmnTypes.getSuperEffectiveType("Steel") //Ice

Check if a type is strong/weak against another

import {pkmnTypes} from 'pokemon-names-and-types'
pkmnTypes.isWeak("Normal","Rock") //True
pkmnTypes.isStrong("Water","Ghost") //False

React Pokemon Badge component

Get a badge with name and specified types

import {Badge} from 'pokemon-names-and-types' 
//Returns a badge with types indicated by color:
<Badge name="SomePokemon" type1="Fire" type2="Grass"/>
1.7.0

6 years ago

1.6.0

7 years ago

1.5.2

8 years ago

1.5.1

8 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago