597021d95bc3116ffd325bc0721342a2.json 25.2 KB
{"ast":null,"code":"/**\n * @fileoverview This module provides some functions to check the type of variable\n * @author NHN.\n *         FE Development Lab <dl_javascript@nhn.com>\n */\n'use strict';\n\nvar toString = Object.prototype.toString;\n/**\n * Check whether the given variable is existing or not.<br>\n *  If the given variable is not null and not undefined, returns true.\n * @param {*} param - Target for checking\n * @returns {boolean} Is existy?\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * util.isExisty(''); //true\n * util.isExisty(0); //true\n * util.isExisty([]); //true\n * util.isExisty({}); //true\n * util.isExisty(null); //false\n * util.isExisty(undefined); //false\n*/\n\nfunction isExisty(param) {\n  return !isUndefined(param) && !isNull(param);\n}\n/**\n * Check whether the given variable is undefined or not.<br>\n *  If the given variable is undefined, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is undefined?\n * @memberof tui.util\n */\n\n\nfunction isUndefined(obj) {\n  return obj === undefined; // eslint-disable-line no-undefined\n}\n/**\n * Check whether the given variable is null or not.<br>\n *  If the given variable(arguments[0]) is null, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is null?\n * @memberof tui.util\n */\n\n\nfunction isNull(obj) {\n  return obj === null;\n}\n/**\n * Check whether the given variable is truthy or not.<br>\n *  If the given variable is not null or not undefined or not false, returns true.<br>\n *  (It regards 0 as true)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is truthy?\n * @memberof tui.util\n */\n\n\nfunction isTruthy(obj) {\n  return isExisty(obj) && obj !== false;\n}\n/**\n * Check whether the given variable is falsy or not.<br>\n *  If the given variable is null or undefined or false, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is falsy?\n * @memberof tui.util\n */\n\n\nfunction isFalsy(obj) {\n  return !isTruthy(obj);\n}\n/**\n * Check whether the given variable is an arguments object or not.<br>\n *  If the given variable is an arguments object, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is arguments?\n * @memberof tui.util\n */\n\n\nfunction isArguments(obj) {\n  var result = isExisty(obj) && (toString.call(obj) === '[object Arguments]' || !!obj.callee);\n  return result;\n}\n/**\n * Check whether the given variable is an instance of Array or not.<br>\n *  If the given variable is an instance of Array, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is array instance?\n * @memberof tui.util\n */\n\n\nfunction isArray(obj) {\n  return obj instanceof Array;\n}\n/**\n * Check whether the given variable is an object or not.<br>\n *  If the given variable is an object, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is object?\n * @memberof tui.util\n */\n\n\nfunction isObject(obj) {\n  return obj === Object(obj);\n}\n/**\n * Check whether the given variable is a function or not.<br>\n *  If the given variable is a function, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is function?\n * @memberof tui.util\n */\n\n\nfunction isFunction(obj) {\n  return obj instanceof Function;\n}\n/**\n * Check whether the given variable is a number or not.<br>\n *  If the given variable is a number, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is number?\n * @memberof tui.util\n */\n\n\nfunction isNumber(obj) {\n  return typeof obj === 'number' || obj instanceof Number;\n}\n/**\n * Check whether the given variable is a string or not.<br>\n *  If the given variable is a string, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is string?\n * @memberof tui.util\n */\n\n\nfunction isString(obj) {\n  return typeof obj === 'string' || obj instanceof String;\n}\n/**\n * Check whether the given variable is a boolean or not.<br>\n *  If the given variable is a boolean, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is boolean?\n * @memberof tui.util\n */\n\n\nfunction isBoolean(obj) {\n  return typeof obj === 'boolean' || obj instanceof Boolean;\n}\n/**\n * Check whether the given variable is an instance of Array or not.<br>\n *  If the given variable is an instance of Array, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is an instance of array?\n * @memberof tui.util\n */\n\n\nfunction isArraySafe(obj) {\n  return toString.call(obj) === '[object Array]';\n}\n/**\n * Check whether the given variable is a function or not.<br>\n *  If the given variable is a function, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a function?\n * @memberof tui.util\n */\n\n\nfunction isFunctionSafe(obj) {\n  return toString.call(obj) === '[object Function]';\n}\n/**\n * Check whether the given variable is a number or not.<br>\n *  If the given variable is a number, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a number?\n * @memberof tui.util\n */\n\n\nfunction isNumberSafe(obj) {\n  return toString.call(obj) === '[object Number]';\n}\n/**\n * Check whether the given variable is a string or not.<br>\n *  If the given variable is a string, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a string?\n * @memberof tui.util\n */\n\n\nfunction isStringSafe(obj) {\n  return toString.call(obj) === '[object String]';\n}\n/**\n * Check whether the given variable is a boolean or not.<br>\n *  If the given variable is a boolean, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a boolean?\n * @memberof tui.util\n */\n\n\nfunction isBooleanSafe(obj) {\n  return toString.call(obj) === '[object Boolean]';\n}\n/**\n * Check whether the given variable is a instance of HTMLNode or not.<br>\n *  If the given variables is a instance of HTMLNode, return true.\n * @param {*} html - Target for checking\n * @returns {boolean} Is HTMLNode ?\n * @memberof tui.util\n */\n\n\nfunction isHTMLNode(html) {\n  if (typeof HTMLElement === 'object') {\n    return html && (html instanceof HTMLElement || !!html.nodeType);\n  }\n\n  return !!(html && html.nodeType);\n}\n/**\n * Check whether the given variable is a HTML tag or not.<br>\n *  If the given variables is a HTML tag, return true.\n * @param {*} html - Target for checking\n * @returns {Boolean} Is HTML tag?\n * @memberof tui.util\n */\n\n\nfunction isHTMLTag(html) {\n  if (typeof HTMLElement === 'object') {\n    return html && html instanceof HTMLElement;\n  }\n\n  return !!(html && html.nodeType && html.nodeType === 1);\n}\n/**\n * Check whether the given variable is empty(null, undefined, or empty array, empty object) or not.<br>\n *  If the given variables is empty, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is empty?\n * @memberof tui.util\n */\n\n\nfunction isEmpty(obj) {\n  if (!isExisty(obj) || _isEmptyString(obj)) {\n    return true;\n  }\n\n  if (isArray(obj) || isArguments(obj)) {\n    return obj.length === 0;\n  }\n\n  if (isObject(obj) && !isFunction(obj)) {\n    return !_hasOwnProperty(obj);\n  }\n\n  return true;\n}\n/**\n * Check whether given argument is empty string\n * @param {*} obj - Target for checking\n * @returns {boolean} whether given argument is empty string\n * @memberof tui.util\n * @private\n */\n\n\nfunction _isEmptyString(obj) {\n  return isString(obj) && obj === '';\n}\n/**\n * Check whether given argument has own property\n * @param {Object} obj - Target for checking\n * @returns {boolean} - whether given argument has own property\n * @memberof tui.util\n * @private\n */\n\n\nfunction _hasOwnProperty(obj) {\n  var key;\n\n  for (key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      return true;\n    }\n  }\n\n  return false;\n}\n/**\n * Check whether the given variable is not empty\n * (not null, not undefined, or not empty array, not empty object) or not.<br>\n *  If the given variables is not empty, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is not empty?\n * @memberof tui.util\n */\n\n\nfunction isNotEmpty(obj) {\n  return !isEmpty(obj);\n}\n/**\n * Check whether the given variable is an instance of Date or not.<br>\n *  If the given variables is an instance of Date, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is an instance of Date?\n * @memberof tui.util\n */\n\n\nfunction isDate(obj) {\n  return obj instanceof Date;\n}\n/**\n * Check whether the given variable is an instance of Date or not.<br>\n *  If the given variables is an instance of Date, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is an instance of Date?\n * @memberof tui.util\n */\n\n\nfunction isDateSafe(obj) {\n  return toString.call(obj) === '[object Date]';\n}\n\nmodule.exports = {\n  isExisty: isExisty,\n  isUndefined: isUndefined,\n  isNull: isNull,\n  isTruthy: isTruthy,\n  isFalsy: isFalsy,\n  isArguments: isArguments,\n  isArray: isArray,\n  isArraySafe: isArraySafe,\n  isObject: isObject,\n  isFunction: isFunction,\n  isFunctionSafe: isFunctionSafe,\n  isNumber: isNumber,\n  isNumberSafe: isNumberSafe,\n  isDate: isDate,\n  isDateSafe: isDateSafe,\n  isString: isString,\n  isStringSafe: isStringSafe,\n  isBoolean: isBoolean,\n  isBooleanSafe: isBooleanSafe,\n  isHTMLNode: isHTMLNode,\n  isHTMLTag: isHTMLTag,\n  isEmpty: isEmpty,\n  isNotEmpty: isNotEmpty\n};","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/tui-code-snippet/src/js/type.js"],"names":["toString","Object","prototype","isExisty","param","isUndefined","isNull","obj","undefined","isTruthy","isFalsy","isArguments","result","call","callee","isArray","Array","isObject","isFunction","Function","isNumber","Number","isString","String","isBoolean","Boolean","isArraySafe","isFunctionSafe","isNumberSafe","isStringSafe","isBooleanSafe","isHTMLNode","html","HTMLElement","nodeType","isHTMLTag","isEmpty","_isEmptyString","length","_hasOwnProperty","key","hasOwnProperty","isNotEmpty","isDate","Date","isDateSafe","module","exports"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAEA;;AAEA,IAAIA,QAAQ,GAAGC,MAAM,CAACC,SAAP,CAAiBF,QAAhC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASG,QAAT,CAAkBC,KAAlB,EAAyB;AACrB,SAAO,CAACC,WAAW,CAACD,KAAD,CAAZ,IAAuB,CAACE,MAAM,CAACF,KAAD,CAArC;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASC,WAAT,CAAqBE,GAArB,EAA0B;AACtB,SAAOA,GAAG,KAAKC,SAAf,CADsB,CACI;AAC7B;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASF,MAAT,CAAgBC,GAAhB,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CAAf;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASoC,MAAT,CAAgBpC,GAAhB,EAAqB;AACjB,SAAOA,GAAG,YAAYqC,IAAtB;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASC,UAAT,CAAoBtC,GAApB,EAAyB;AACrB,SAAOP,QAAQ,CAACa,IAAT,CAAcN,GAAd,MAAuB,eAA9B;AACH;;AAEDuC,MAAM,CAACC,OAAP,GAAiB;AACb5C,EAAAA,QAAQ,EAAEA,QADG;AAEbE,EAAAA,WAAW,EAAEA,WAFA;AAGbC,EAAAA,MAAM,EAAEA,MAHK;AAIbG,EAAAA,QAAQ,EAAEA,QAJG;AAKbC,EAAAA,OAAO,EAAEA,OALI;AAMbC,EAAAA,WAAW,EAAEA,WANA;AAObI,EAAAA,OAAO,EAAEA,OAPI;AAQbW,EAAAA,WAAW,EAAEA,WARA;AASbT,EAAAA,QAAQ,EAAEA,QATG;AAUbC,EAAAA,UAAU,EAAEA,UAVC;AAWbS,EAAAA,cAAc,EAAEA,cAXH;AAYbP,EAAAA,QAAQ,EAAEA,QAZG;AAabQ,EAAAA,YAAY,EAAEA,YAbD;AAcbe,EAAAA,MAAM,EAAEA,MAdK;AAebE,EAAAA,UAAU,EAAEA,UAfC;AAgBbvB,EAAAA,QAAQ,EAAEA,QAhBG;AAiBbO,EAAAA,YAAY,EAAEA,YAjBD;AAkBbL,EAAAA,SAAS,EAAEA,SAlBE;AAmBbM,EAAAA,aAAa,EAAEA,aAnBF;AAoBbC,EAAAA,UAAU,EAAEA,UApBC;AAqBbI,EAAAA,SAAS,EAAEA,SArBE;AAsBbC,EAAAA,OAAO,EAAEA,OAtBI;AAuBbM,EAAAA,UAAU,EAAEA;AAvBC,CAAjB","sourcesContent":["/**\n * @fileoverview This module provides some functions to check the type of variable\n * @author NHN.\n *         FE Development Lab <dl_javascript@nhn.com>\n */\n\n'use strict';\n\nvar toString = Object.prototype.toString;\n\n/**\n * Check whether the given variable is existing or not.<br>\n *  If the given variable is not null and not undefined, returns true.\n * @param {*} param - Target for checking\n * @returns {boolean} Is existy?\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * util.isExisty(''); //true\n * util.isExisty(0); //true\n * util.isExisty([]); //true\n * util.isExisty({}); //true\n * util.isExisty(null); //false\n * util.isExisty(undefined); //false\n*/\nfunction isExisty(param) {\n    return !isUndefined(param) && !isNull(param);\n}\n\n/**\n * Check whether the given variable is undefined or not.<br>\n *  If the given variable is undefined, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is undefined?\n * @memberof tui.util\n */\nfunction isUndefined(obj) {\n    return obj === undefined; // eslint-disable-line no-undefined\n}\n\n/**\n * Check whether the given variable is null or not.<br>\n *  If the given variable(arguments[0]) is null, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is null?\n * @memberof tui.util\n */\nfunction isNull(obj) {\n    return obj === null;\n}\n\n/**\n * Check whether the given variable is truthy or not.<br>\n *  If the given variable is not null or not undefined or not false, returns true.<br>\n *  (It regards 0 as true)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is truthy?\n * @memberof tui.util\n */\nfunction isTruthy(obj) {\n    return isExisty(obj) && obj !== false;\n}\n\n/**\n * Check whether the given variable is falsy or not.<br>\n *  If the given variable is null or undefined or false, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is falsy?\n * @memberof tui.util\n */\nfunction isFalsy(obj) {\n    return !isTruthy(obj);\n}\n\n/**\n * Check whether the given variable is an arguments object or not.<br>\n *  If the given variable is an arguments object, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is arguments?\n * @memberof tui.util\n */\nfunction isArguments(obj) {\n    var result = isExisty(obj) &&\n        ((toString.call(obj) === '[object Arguments]') || !!obj.callee);\n\n    return result;\n}\n\n/**\n * Check whether the given variable is an instance of Array or not.<br>\n *  If the given variable is an instance of Array, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is array instance?\n * @memberof tui.util\n */\nfunction isArray(obj) {\n    return obj instanceof Array;\n}\n\n/**\n * Check whether the given variable is an object or not.<br>\n *  If the given variable is an object, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is object?\n * @memberof tui.util\n */\nfunction isObject(obj) {\n    return obj === Object(obj);\n}\n\n/**\n * Check whether the given variable is a function or not.<br>\n *  If the given variable is a function, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is function?\n * @memberof tui.util\n */\nfunction isFunction(obj) {\n    return obj instanceof Function;\n}\n\n/**\n * Check whether the given variable is a number or not.<br>\n *  If the given variable is a number, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is number?\n * @memberof tui.util\n */\nfunction isNumber(obj) {\n    return typeof obj === 'number' || obj instanceof Number;\n}\n\n/**\n * Check whether the given variable is a string or not.<br>\n *  If the given variable is a string, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is string?\n * @memberof tui.util\n */\nfunction isString(obj) {\n    return typeof obj === 'string' || obj instanceof String;\n}\n\n/**\n * Check whether the given variable is a boolean or not.<br>\n *  If the given variable is a boolean, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is boolean?\n * @memberof tui.util\n */\nfunction isBoolean(obj) {\n    return typeof obj === 'boolean' || obj instanceof Boolean;\n}\n\n/**\n * Check whether the given variable is an instance of Array or not.<br>\n *  If the given variable is an instance of Array, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is an instance of array?\n * @memberof tui.util\n */\nfunction isArraySafe(obj) {\n    return toString.call(obj) === '[object Array]';\n}\n\n/**\n * Check whether the given variable is a function or not.<br>\n *  If the given variable is a function, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a function?\n * @memberof tui.util\n */\nfunction isFunctionSafe(obj) {\n    return toString.call(obj) === '[object Function]';\n}\n\n/**\n * Check whether the given variable is a number or not.<br>\n *  If the given variable is a number, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a number?\n * @memberof tui.util\n */\nfunction isNumberSafe(obj) {\n    return toString.call(obj) === '[object Number]';\n}\n\n/**\n * Check whether the given variable is a string or not.<br>\n *  If the given variable is a string, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a string?\n * @memberof tui.util\n */\nfunction isStringSafe(obj) {\n    return toString.call(obj) === '[object String]';\n}\n\n/**\n * Check whether the given variable is a boolean or not.<br>\n *  If the given variable is a boolean, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a boolean?\n * @memberof tui.util\n */\nfunction isBooleanSafe(obj) {\n    return toString.call(obj) === '[object Boolean]';\n}\n\n/**\n * Check whether the given variable is a instance of HTMLNode or not.<br>\n *  If the given variables is a instance of HTMLNode, return true.\n * @param {*} html - Target for checking\n * @returns {boolean} Is HTMLNode ?\n * @memberof tui.util\n */\nfunction isHTMLNode(html) {\n    if (typeof HTMLElement === 'object') {\n        return (html && (html instanceof HTMLElement || !!html.nodeType));\n    }\n\n    return !!(html && html.nodeType);\n}\n\n/**\n * Check whether the given variable is a HTML tag or not.<br>\n *  If the given variables is a HTML tag, return true.\n * @param {*} html - Target for checking\n * @returns {Boolean} Is HTML tag?\n * @memberof tui.util\n */\nfunction isHTMLTag(html) {\n    if (typeof HTMLElement === 'object') {\n        return (html && (html instanceof HTMLElement));\n    }\n\n    return !!(html && html.nodeType && html.nodeType === 1);\n}\n\n/**\n * Check whether the given variable is empty(null, undefined, or empty array, empty object) or not.<br>\n *  If the given variables is empty, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is empty?\n * @memberof tui.util\n */\nfunction isEmpty(obj) {\n    if (!isExisty(obj) || _isEmptyString(obj)) {\n        return true;\n    }\n\n    if (isArray(obj) || isArguments(obj)) {\n        return obj.length === 0;\n    }\n\n    if (isObject(obj) && !isFunction(obj)) {\n        return !_hasOwnProperty(obj);\n    }\n\n    return true;\n}\n\n/**\n * Check whether given argument is empty string\n * @param {*} obj - Target for checking\n * @returns {boolean} whether given argument is empty string\n * @memberof tui.util\n * @private\n */\nfunction _isEmptyString(obj) {\n    return isString(obj) && obj === '';\n}\n\n/**\n * Check whether given argument has own property\n * @param {Object} obj - Target for checking\n * @returns {boolean} - whether given argument has own property\n * @memberof tui.util\n * @private\n */\nfunction _hasOwnProperty(obj) {\n    var key;\n    for (key in obj) {\n        if (obj.hasOwnProperty(key)) {\n            return true;\n        }\n    }\n\n    return false;\n}\n\n/**\n * Check whether the given variable is not empty\n * (not null, not undefined, or not empty array, not empty object) or not.<br>\n *  If the given variables is not empty, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is not empty?\n * @memberof tui.util\n */\nfunction isNotEmpty(obj) {\n    return !isEmpty(obj);\n}\n\n/**\n * Check whether the given variable is an instance of Date or not.<br>\n *  If the given variables is an instance of Date, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is an instance of Date?\n * @memberof tui.util\n */\nfunction isDate(obj) {\n    return obj instanceof Date;\n}\n\n/**\n * Check whether the given variable is an instance of Date or not.<br>\n *  If the given variables is an instance of Date, return true.<br>\n *  (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is an instance of Date?\n * @memberof tui.util\n */\nfunction isDateSafe(obj) {\n    return toString.call(obj) === '[object Date]';\n}\n\nmodule.exports = {\n    isExisty: isExisty,\n    isUndefined: isUndefined,\n    isNull: isNull,\n    isTruthy: isTruthy,\n    isFalsy: isFalsy,\n    isArguments: isArguments,\n    isArray: isArray,\n    isArraySafe: isArraySafe,\n    isObject: isObject,\n    isFunction: isFunction,\n    isFunctionSafe: isFunctionSafe,\n    isNumber: isNumber,\n    isNumberSafe: isNumberSafe,\n    isDate: isDate,\n    isDateSafe: isDateSafe,\n    isString: isString,\n    isStringSafe: isStringSafe,\n    isBoolean: isBoolean,\n    isBooleanSafe: isBooleanSafe,\n    isHTMLNode: isHTMLNode,\n    isHTMLTag: isHTMLTag,\n    isEmpty: isEmpty,\n    isNotEmpty: isNotEmpty\n};\n"]},"metadata":{},"sourceType":"script"}