diff --git a/package.json b/package.json index 0f55aaa87..3e7ce81f3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ -// ServerJS package specification. { + "!": "This is a Narwhal package descriptor.", "name": "underscore", "description": "Functional programming aid for Javascript. Works well with jQuery.", "url": "http://documentcloud.github.com/underscore/", @@ -8,5 +8,5 @@ "maintainer": "Kris Kowal ", "contributors": [], "dependencies": [], - "lib", "." + "lib": "." } diff --git a/underscore.js b/underscore.js index 76a2bc205..c89842dd9 100644 --- a/underscore.js +++ b/underscore.js @@ -31,7 +31,7 @@ obj.each(function(value) { iterator.call(context, value, index++); }); } else { var i = 0; - for (var key in obj) if (obj.hasOwnProperty(key)) { + for (var key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) { var value = obj[key], pair = [key, value]; pair.key = key; pair.value = value;