aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/ensnare.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-06-22 06:04:00 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-06-22 06:04:00 +0800
commitcf663f1104697440121d32cc6db2a8a1d5d54c5a (patch)
tree3ed4b8b9fe8c85f3b3a5bf68482c3fb9967f2de5 /app/scripts/lib/ensnare.js
parent265725c6edd62a7f46a9b9cf5a443cf01f0ff00c (diff)
parentdc2ef967028723afe9fe1efd669754723e38a4f0 (diff)
downloadtangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.gz
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.bz2
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.lz
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.xz
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.zst
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.zip
Fix conflict
Diffstat (limited to 'app/scripts/lib/ensnare.js')
-rw-r--r--app/scripts/lib/ensnare.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/scripts/lib/ensnare.js b/app/scripts/lib/ensnare.js
index b70330a5a..6100f7c79 100644
--- a/app/scripts/lib/ensnare.js
+++ b/app/scripts/lib/ensnare.js
@@ -1,21 +1,21 @@
module.exports = ensnare
// creates a proxy object that calls cb everytime the obj's properties/fns are accessed
-function ensnare(obj, cb){
+function ensnare (obj, cb) {
var proxy = {}
- Object.keys(obj).forEach(function(key){
+ Object.keys(obj).forEach(function (key) {
var val = obj[key]
switch (typeof val) {
case 'function':
- proxy[key] = function(){
+ proxy[key] = function () {
cb()
val.apply(obj, arguments)
}
return
default:
Object.defineProperty(proxy, key, {
- get: function(){ cb(); return obj[key] },
- set: function(val){ cb(); return obj[key] = val },
+ get: function () { cb(); return obj[key] },
+ set: function (val) { cb(); obj[key] = val; return val },
})
return
}