document-watch

0.1.2 • Public • Published

Document Watch

Document is a little module that enables you to do one thing, watch for changes in documents in an atomic way.
It's available through npm:

npm install document-watch

And it's super easy to use:

var watch = require('document-watch');
 
var doc = {hello:'world', count:0};
 
var unwatch = watch(doc, function(changes) {
    console.log(changes);
});
 
doc.hello = 'other world';
doc.count++;
doc.count++;
 
// on nextTick the following gets printed:
 
{hello:'other world', count:2}
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    2
  • 0.1.1
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i document-watch

Weekly Downloads

4

Version

0.1.2

License

none

Last publish

Collaborators

  • mafintosh