Compare commits

...

2 Commits

Author SHA1 Message Date
AJ ONeal aaf82310b0 v1.0.7 2018-05-09 18:24:21 -06:00
AJ ONeal e91991c4db v1.0.6 2018-05-09 18:22:12 -06:00
2 changed files with 14 additions and 15 deletions

View File

@ -1,17 +1,19 @@
/*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) {
name = classes[i];
class2type["[object " + name + "]"] = name.toLowerCase();
if (classes.hasOwnProperty(i)) {
name = classes[i];
class2type["[object " + name + "]"] = name.toLowerCase();
}
}
function typeOf(obj) {
@ -93,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');
}());

View File

@ -3,6 +3,7 @@
"contributors": [ "Douglas Crockford <douglas@crockford.com>" ],
"dependencies": {},
"description": "Deprecated. Utilities for ES3, most of which have been adopted or superseded in ES5.1. Adapted from Douglas Crockford's Remedial JavaScript",
"homepage": "https://git.coolaj86.com/coolaj86/remedial.js",
"engines": {
"node": "*"
},
@ -15,9 +16,7 @@
"supplant",
"trim"
],
"lib": "lib",
"main": "./lib/remedial",
"main": "./index",
"name": "remedial",
"homepage": "https://git.coolaj86.com/coolaj86/remedial.js",
"version": "1.0.5"
"version": "1.0.7"
}