Skip to content

JosephDavis/perception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perception

Build Status npm version

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)

About

Perceive events and observables with ease in JavaScript.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors