harry-potter-spells
v0.0.4
Published
List of Harry Potter spells
Downloads
24
Maintainers
Readme
harry-potter-spells
List of Harry Potter spells
Install
$ yarn add harry-potter-spells
Usage
const harryPotterSpells = require('harry-potter-spells')
console.log(harryPotterSpells.random())
// => { "name": "Crucio", "type": "curse", "effect": "Tortures opponent" }
console.log(harryPotterSpells.all)
/*
[{
"name": "Crucio",
"type": "curse",
"effect": "Tortures opponent"
},
...
]
*/
Demo
API
harryPotterSpells()
.random()
Returns an object
Get a random spell
.all
Returns an array
Get all spells
.spell(input)
Returns an object
Get a specific spell
input
Type: string
Spell's name
License
MIT © Bu Kinoshita