General
The pubsub service provides event methods per topic to extend objects, therefore allowing subscription/unsubscription/emission.
Install
npm i qipp-services-pubsub
Angular usage
First, use the pubsub() method to extend a given object:
{ objprop++}var obj = objobj // obj {prop: 2}objobj // No change: obj {prop: 2}
Note that the unsubscription could be done for a specific callback:
obj
Moreover, the subscription/unsubscription could be done on multiple topics simultaneously:
objobj
Tools
Linting with StandardJS
Please refer to the JavaScript Standard Style for general rules.
npm run lint
Unit testing with Karma
npm test
Requirements
Angular
- angular 1.4.3
Licence
Released under the MIT license by qipp.