Api Reference
As described before Refraction exports only one class, you need a set of other library to use all its functionality, see Ecosystem for more information. Here is the list of methods that you can use on its instance:
- constructor(middlewares = [])
- subscribe(subscriber)
- unsubscribe(subscriber)
- publish(channel, param)
- setHistoryLimit(limit)
- getHistory()
- clearHistory()
Importing
You can import it like this:
ES6
import Refraction from 'refraction'
ES5 (CommonJS)
var Refraction = require('refraction').default