npm.io
0.0.2 • Published 10 years ago

simple-signal

Licence
MIT
Version
0.0.2
Deps
0
Vulns
0
Weekly
0

simple-signal

Example Usage

import Signal from 'simple-signal';

const signal = new Signal();

const handler = v => console.log(v);

signal.on(handler);

// Will log 'Simple!'
signal.emit('Simple!');

signal.off(handler);

signal.emit('This will not be logged!');

That is literally it.

Keywords