26 lines
774 B
JavaScript
26 lines
774 B
JavaScript
'use strict';
|
|
|
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
|
|
module.exports = {
|
|
/**
|
|
* @returns {boolean}
|
|
*/
|
|
isArray: function isArray(item) {
|
|
return Array.isArray(item);
|
|
},
|
|
|
|
/**
|
|
* @returns {boolean}
|
|
*/
|
|
isObject: function isObject(item) {
|
|
return _typeof(item) === 'object' && Array.isArray(item) === false && item !== null;
|
|
},
|
|
|
|
/**
|
|
* @returns {boolean}
|
|
*/
|
|
isFunction: function isFunction(item) {
|
|
return typeof item === 'function';
|
|
}
|
|
}; |