empty Checker
"use strict";
/**
*
* @author xgqfrms
* @license MIT
* @copyright xgqfrms
*
* @description Utils & emptyChecker();
* @augments
* @example
*
* @param {String} key
* @param {Boolean} debug
*/
const emptyChecker = (key = ``, debug = false) => {
let result = true,
strKey = `${key}`;
switch (strKey) {
case "undefined":
result = false;
break;
case "null":
result = false;
break;
case "":
result = false;
break;
case "--":
result = false;
break;
// case "0":
// result = false;
// break;
case -1.7976931348623157e+308:
result = false;
break;
default:
break;
}
if (debug) {
console.log(`key =`, key);
console.log(`strKey =`, strKey);
console.log(`result =`, result);
}
return result;
};
export default emptyChecker;
export {
emptyChecker
};