radiodan/magic-button — pull request #8 by pixelblend (2014-11-07 13:24:00+00:00)
Title: Update actions interface

Original interface was very naive and simple. It's been updated to
(hopefully) cover a wider range of use cases.

# Action Attributes

## Name
Name of the action. Would be wise to keep this similar to the filename.

## Events
An array of `event` objects, which are to be attached to the state machine in `lib/state.js`.

# Event Attributes
## Name
Name of the event that can be instantiated by calling `state.handle(eventName)`

## States
An Array of states that the event is bound to.

## Action
The function that is called when the event is triggered.