diff options
Diffstat (limited to 'node_modules/locutus/php/var/boolval.js.map')
-rw-r--r-- | node_modules/locutus/php/var/boolval.js.map | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/node_modules/locutus/php/var/boolval.js.map b/node_modules/locutus/php/var/boolval.js.map deleted file mode 100644 index 2853855..0000000 --- a/node_modules/locutus/php/var/boolval.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../../src/php/var/boolval.js"],"names":["module","exports","boolval","mixedVar","Array","isArray","length","undefined"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIA,aAAa,KAAjB,EAAwB;AACtB,WAAO,KAAP;AACD;;AAED,MAAIA,aAAa,CAAb,IAAkBA,aAAa,GAAnC,EAAwC;AACtC,WAAO,KAAP;AACD;;AAED,MAAIA,aAAa,EAAb,IAAmBA,aAAa,GAApC,EAAyC;AACvC,WAAO,KAAP;AACD;;AAED,MAAIC,MAAMC,OAAN,CAAcF,QAAd,KAA2BA,SAASG,MAAT,KAAoB,CAAnD,EAAsD;AACpD,WAAO,KAAP;AACD;;AAED,MAAIH,aAAa,IAAb,IAAqBA,aAAaI,SAAtC,EAAiD;AAC/C,WAAO,KAAP;AACD;;AAED,SAAO,IAAP;AACD,CA9CD","file":"boolval.js","sourcesContent":["module.exports = function boolval (mixedVar) {\n // original by: Will Rowe\n // example 1: boolval(true)\n // returns 1: true\n // example 2: boolval(false)\n // returns 2: false\n // example 3: boolval(0)\n // returns 3: false\n // example 4: boolval(0.0)\n // returns 4: false\n // example 5: boolval('')\n // returns 5: false\n // example 6: boolval('0')\n // returns 6: false\n // example 7: boolval([])\n // returns 7: false\n // example 8: boolval('')\n // returns 8: false\n // example 9: boolval(null)\n // returns 9: false\n // example 10: boolval(undefined)\n // returns 10: false\n // example 11: boolval('true')\n // returns 11: true\n\n if (mixedVar === false) {\n return false\n }\n\n if (mixedVar === 0 || mixedVar === 0.0) {\n return false\n }\n\n if (mixedVar === '' || mixedVar === '0') {\n return false\n }\n\n if (Array.isArray(mixedVar) && mixedVar.length === 0) {\n return false\n }\n\n if (mixedVar === null || mixedVar === undefined) {\n return false\n }\n\n return true\n}\n"]}
\ No newline at end of file |