element-nice-ui
Version:
A Component Library for Vue.js.
32 lines (31 loc) • 917 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isFunction = exports.isDefined = void 0;
exports.isHtmlElement = isHtmlElement;
exports.isObject = isObject;
exports.isString = isString;
exports.isUndefined = void 0;
function isString(obj) {
return Object.prototype.toString.call(obj) === '[object String]';
}
function isObject(obj) {
return Object.prototype.toString.call(obj) === '[object Object]';
}
function isHtmlElement(node) {
return node && node.nodeType === Node.ELEMENT_NODE;
}
const isFunction = functionToCheck => {
var getType = {};
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
};
exports.isFunction = isFunction;
const isUndefined = val => {
return val === void 0;
};
exports.isUndefined = isUndefined;
const isDefined = val => {
return val !== undefined && val !== null;
};
exports.isDefined = isDefined;