diff options
Diffstat (limited to 'node_modules/locutus/php/math/is_finite.js.map')
-rw-r--r-- | node_modules/locutus/php/math/is_finite.js.map | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/node_modules/locutus/php/math/is_finite.js.map b/node_modules/locutus/php/math/is_finite.js.map new file mode 100644 index 0000000..40faf73 --- /dev/null +++ b/node_modules/locutus/php/math/is_finite.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../src/php/math/is_finite.js"],"names":["module","exports","is_finite","val","warningType","Infinity","Object","prototype","toString","call","match","msg","Error"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,GAApB,EAAyB;AAAE;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,cAAc,EAAlB;;AAEA,MAAID,QAAQE,QAAR,IAAoBF,QAAQ,CAACE,QAAjC,EAA2C;AACzC,WAAO,KAAP;AACD;;AAED;AACA,MAAI,QAAOF,GAAP,yCAAOA,GAAP,OAAe,QAAnB,EAA6B;AAC3BC,kBAAeE,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BN,GAA/B,MAAwC,gBAAxC,GAA2D,OAA3D,GAAqE,QAApF;AACD,GAFD,MAEO,IAAI,OAAOA,GAAP,KAAe,QAAf,IAA2B,CAACA,IAAIO,KAAJ,CAAU,UAAV,CAAhC,EAAuD;AAC5D;AACAN,kBAAc,QAAd;AACD;AACD,MAAIA,WAAJ,EAAiB;AACf,QAAIO,MAAM,4DAA4DP,WAA5D,GAA0E,QAApF;AACA,UAAM,IAAIQ,KAAJ,CAAUD,GAAV,CAAN;AACD;;AAED,SAAO,IAAP;AACD,CA7BD","file":"is_finite.js","sourcesContent":["module.exports = function is_finite (val) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_finite/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: is_finite(Infinity)\n // returns 1: false\n // example 2: is_finite(-Infinity)\n // returns 2: false\n // example 3: is_finite(0)\n // returns 3: true\n\n var warningType = ''\n\n if (val === Infinity || val === -Infinity) {\n return false\n }\n\n // Some warnings for maximum PHP compatibility\n if (typeof val === 'object') {\n warningType = (Object.prototype.toString.call(val) === '[object Array]' ? 'array' : 'object')\n } else if (typeof val === 'string' && !val.match(/^[+-]?\\d/)) {\n // simulate PHP's behaviour: '-9a' doesn't give a warning, but 'a9' does.\n warningType = 'string'\n }\n if (warningType) {\n var msg = 'Warning: is_finite() expects parameter 1 to be double, ' + warningType + ' given'\n throw new Error(msg)\n }\n\n return true\n}\n"]}
\ No newline at end of file |