perception
v1.0.1
Published
Perceive events and observables with ease
Downloads
17
Maintainers
Readme
Perception
Perceive events and observables with ease.
Table of Contents
Requirements
For use in a Node.js environment:
Usage
const perception = require('perception');
const ObservableArray = perception.ObservableArray;
const array = new ObservableArray(1, 2, 3);
array.addListener('add', added => {
console.log(`Added: ${added}!`);
});
array.push(4); // Console shows: 'Added: 4!'
Installation
To install as a dependency in your package.json
file, run the following command:
npm install -S perception
Documentation
Perception provides several observable classes and an event dispatcher.
Observables:
- ObservableArray
- ObservableMap
- ObservableSet
- ObservableValue
Events:
- EventDispatcher
For documentation, please refer to docs/current.md
.
License
Perception is licensed under the Apache License 2.0. See LICENSE
for details.
Copyright © 2016, Joey Davis (github.com/JosephDavis)