保誠-保戶業務員媒合平台
jack
2025-01-06 e0c6891acc471f9adf2e29b2a5bed3f8337a92b2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import Vue from 'vue';
 
export function isString(obj) {
  return Object.prototype.toString.call(obj) === '[object String]';
}
 
export function isObject(obj) {
  return Object.prototype.toString.call(obj) === '[object Object]';
}
 
export function isHtmlElement(node) {
  return node && node.nodeType === Node.ELEMENT_NODE;
}
 
/**
 *  - Inspired:
 *    https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
 */
let isFunction = (functionToCheck) => {
  var getType = {};
  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
};
 
if (typeof /./ !== 'function' && typeof Int8Array !== 'object' && (Vue.prototype.$isServer || typeof document.childNodes !== 'function')) {
  isFunction = function(obj) {
    return typeof obj === 'function' || false;
  };
}
 
export {
  isFunction
};
 
export const isUndefined = (val)=> {
  return val === void 0;
};
 
export const isDefined = (val) => {
  return val !== undefined && val !== null;
};