0.0.4 • Published 4 years ago

harry-potter-spells v0.0.4

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

harry-potter-spells Build Status

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