diff --git a/lib/package.json b/lib/package.json new file mode 100644 index 0000000..910a8ab --- /dev/null +++ b/lib/package.json @@ -0,0 +1,11 @@ +{ + "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" : ["AJ ONeal "], + "dependencies" : [], + "main" : "./remedial", + "version" : "1.0.6" +} diff --git a/lib/remedial.js b/lib/remedial.js index 9fba228..5dba47f 100644 --- a/lib/remedial.js +++ b/lib/remedial.js @@ -1,4 +1,6 @@ /*jslint onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true */ +var provide = provide || function () {}, + global = (function () {return this; }()); (function () { "use strict"; @@ -99,9 +101,7 @@ typeOf: typeOf, isEmpty: isEmpty }; - if ('undefined' === typeof global) { global = window; } global.typeOf = global.typeOf || typeOf; global.isEmpty = global.isEmpty || isEmpty; - if ('undefined' === typeof provide) { provide = function () {}; } provide('remedial'); }());