diff --git a/lib/remedial.js b/lib/index.js similarity index 90% rename from lib/remedial.js rename to lib/index.js index 5dba47f..345248b 100644 --- a/lib/remedial.js +++ b/lib/index.js @@ -1,13 +1,13 @@ /*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"; - var classes = "Boolean Number String Function Array Date RegExp Object".split(" "), - i, - name, - class2type = {}; + var global = Function('return this')() + , classes = "Boolean Number String Function Array Date RegExp Object".split(" ") + , i + , name + , class2type = {} + ; for (i in classes) { if (classes.hasOwnProperty(i)) { @@ -95,13 +95,11 @@ var provide = provide || function () {}, }; } - // Boiler Plate - if ('undefined' === typeof module) { module = {}; } + // CommonJS / npm / Ender.JS module.exports = { typeOf: typeOf, isEmpty: isEmpty }; global.typeOf = global.typeOf || typeOf; global.isEmpty = global.isEmpty || isEmpty; - provide('remedial'); }()); diff --git a/lib/package.json b/lib/package.json index 910a8ab..94033e8 100644 --- a/lib/package.json +++ b/lib/package.json @@ -6,6 +6,6 @@ "author" : "Douglas Crockford ", "contributors" : ["AJ ONeal "], "dependencies" : [], - "main" : "./remedial", - "version" : "1.0.6" + "main" : "./index", + "version" : "1.0.7" }