@ams-team/ams
Version:
Admin Materials System.
19 lines (15 loc) • 371 B
JavaScript
export function getType(obj) {
return Object.prototype.toString
.call(obj)
.replace(/^\[\w+ (\w+)\]$/, '$1')
.toLowerCase();
}
export function isUndefined(val) {
return typeof val === 'undefined';
}
export function isDefined(val) {
return !isUndefined(val);
}
export function isFn(value) {
return typeof value === 'function';
}