nci/lib/utils.js

16 lines
334 B
JavaScript
Raw Normal View History

2014-12-02 21:21:07 +00:00
'use strict';
['Function', 'String', 'Number', 'Date', 'RegExp'].forEach(function(name) {
exports['is' + name] = function(obj) {
return toString.call(obj) == '[object ' + name + ']';
};
});
exports.isObject = function(obj) {
return obj === Object(obj);
};
exports.noop = function() {};
exports.slice = Array.prototype.slice;