From 927b0a7ae7c203d0728d76a0eeb68ddc69510b9a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 4 Mar 2014 13:05:42 +0000 Subject: [PATCH] Less global stuff in helpers.js --- public/js/helpers.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/public/js/helpers.js b/public/js/helpers.js index b522c5358..81cecdae9 100644 --- a/public/js/helpers.js +++ b/public/js/helpers.js @@ -1,10 +1,18 @@ -Object.keys = Object.keys || function(o) { - var result = []; - for(var name in o) { - if (o.hasOwnProperty(name)) - result.push(name); - } - return result; -}; +(function (Object) { + + 'use strict'; + + Object.keys = Object.keys || function(o) { + var result = []; + for(var name in o) { + if (o.hasOwnProperty(name)) { + result.push(name); + } + } + + return result; + }; + +})(Object);