Less global stuff in helpers.js

This commit is contained in:
Thomas Gelf 2014-03-04 13:05:42 +00:00
parent 3cac42161b
commit 927b0a7ae7
1 changed files with 16 additions and 8 deletions

View File

@ -1,10 +1,18 @@
(function (Object) {
'use strict';
Object.keys = Object.keys || function(o) { Object.keys = Object.keys || function(o) {
var result = []; var result = [];
for(var name in o) { for(var name in o) {
if (o.hasOwnProperty(name)) if (o.hasOwnProperty(name)) {
result.push(name); result.push(name);
} }
}
return result; return result;
}; };
})(Object);