observe-object-path
v0.5.0
Published
[![npm version](https://badge.fury.io/js/observe-object-path.svg)](https://badge.fury.io/js/observe-object-path) [![Circle CI](https://circleci.com/gh/d6u/observe-object-path/tree/master.svg?style=svg)](https://circleci.com/gh/d6u/observe-object-path/tree
Downloads
16
Readme
Observe Object Path
Usage
npm install -S observe-object-path
var ObserveObjectPath = require('observe-object-path').ObserveObjectPath;
var obj = {
nested: {
prop: 'propVal'
}
};
var oop = new ObserveObjectPath(obj);
oop.on(['nested', 'prop'], (val) => console.log(val));
oop.update({
nested: {
prop: 'propNewVal'
}
});
// Log 'propNewVal' after `update` is called