diff --git a/lib/remedial.js b/lib/remedial.js index 4561bfd..9fba228 100644 --- a/lib/remedial.js +++ b/lib/remedial.js @@ -8,8 +8,10 @@ class2type = {}; for (i in classes) { - name = classes[i]; - class2type["[object " + name + "]"] = name.toLowerCase(); + if (classes.hasOwnProperty(i)) { + name = classes[i]; + class2type["[object " + name + "]"] = name.toLowerCase(); + } } function typeOf(obj) { diff --git a/package.json b/package.json deleted file mode 100644 index 3dad8d1..0000000 --- a/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name" : "remedial", - "description" : "Douglas Crockford's Remedial JavaScript", - "url" : "http://javascript.crockford.com/remedial.html", - "keywords" : ["util", "isEmpty", "typeOf", "entityify", "quote", "supplant", "trim"], - "author" : "Douglas Crockford ", - "contributors" : [], - "dependencies" : [], - "lib" : "lib", - "main" : "./lib/remedial", - "version" : "1.0.4" -}