1.0.3 • Published 6 years ago

obento-notice v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

obento-notice

obento-notice is a library to easily realize the observer pattern

Installation

Yarn:

yarn add obento-notice

npm:

npm install --save obento-notice

Example

var Notice = require('obento-notice');
var notice = new Notice();

var fc1 = function() {
  console.log('fc1');
}
var fc2 = function() {
  console.log('fc2');
}
notice.listen('pubId', fc1);
notice.listen('pubId', fc2);

notice.publish('pubId');
// 'fc1'
// 'fc2'
1.0.3

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago