object-watcher
Advanced tools
Comparing version
@@ -27,3 +27,3 @@ function watch(target, prop, handler) { | ||
}); | ||
} else if (Object.prototype.__defineGetter__ && Object.prototype.__defineSetter__) { // legacy | ||
} else if (Object.prototype.__defineGetter__ && Object.prototype.__defineSetter__) { // legacy | ||
Object.prototype.__defineGetter__.call(target, prop, getter); | ||
@@ -30,0 +30,0 @@ Object.prototype.__defineSetter__.call(target, prop, setter); |
{ | ||
"name": "object-watcher", | ||
"version": "1.0.0", | ||
"description": "Plugin that allows you to watch for changes in a javacript object", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/tnrich/objectWatcher" | ||
}, | ||
"keywords": ["watch", "listen", "javacript", "object"], | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "tnrich", | ||
"license": "MIT" | ||
} | ||
"name": "object-watcher", | ||
"version": "1.0.1", | ||
"description": "Plugin that allows you to watch for changes in a javacript object", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/tnrich/objectWatcher" | ||
}, | ||
"keywords": [ | ||
"watch", | ||
"listen", | ||
"javacript", | ||
"object" | ||
], | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "tnrich", | ||
"license": "MIT" | ||
} |
@@ -9,2 +9,3 @@ ##ObjectWatcher | ||
``` | ||
var watch = require(object-watcher).watch; | ||
@@ -22,1 +23,2 @@ | ||
watch(data, 'products', watcher); | ||
``` |
3688
1.01%22
4.76%