kola-hooks
v0.0.5
Published
A kola signal hook executes a set of commands on dispatch of a signal
Downloads
6
Maintainers
Readme
kola-hooks
Hooks for use in kola framework
Installation
npm install kola-hooks --save
Usage
import hooks = require('kola-hooks');
function sayHello(payload: string, kontext: Kontext): void {
console.log('Hello!');
}
function sayWorld(payload: string, kontext: Kontext): void {
console.log('Hello!');
}
kontext.setSignal('signals.hello', hooks([sayHello, sayWorld]));