@airb/onion
v0.0.106
Published
onion events processor
Downloads
13
Readme
onion
Create action object for javascript
Install
$ yarn add @airb/onion
Usage
import onion from '@airb/onion';
let context = {},
ob = onion(content);
// add action
ob.add({
action(a, b) {
return this.next(a + b, 1) || a + b;
}
});
// tap action
ob.tap('action', 1, 2);
// bind actions
let proxy = ob.bind(['action']);
// invoke action
proxy.action(1, 2);