1 | export function isString(obj) {
|
2 | return Object.prototype.toString.call(obj) === '[object String]';
|
3 | }
|
4 |
|
5 | export function isObject(obj) {
|
6 | return Object.prototype.toString.call(obj) === '[object Object]';
|
7 | }
|
8 |
|
9 | export function isHtmlElement(node) {
|
10 | return node && node.nodeType === Node.ELEMENT_NODE;
|
11 | }
|
12 |
|
13 | export const isFunction = (functionToCheck) => {
|
14 | var getType = {};
|
15 | return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
16 | };
|
17 |
|
18 | export const isUndefined = (val)=> {
|
19 | return val === void 0;
|
20 | };
|
21 |
|
22 | export const isDefined = (val) => {
|
23 | return val !== undefined && val !== null;
|
24 | };
|