From a08c3bc01b11fbd0e3a243359befbe9fc909edf4 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 21 Jun 2016 13:18:32 -0700 Subject: Auto linted --- app/scripts/lib/ensnare.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/scripts/lib/ensnare.js') 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 } -- cgit v1.2.3