summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/var/is_int.js.map
blob: 93801e90e990b37f75326cd8068aa8cbd94cb18a (plain) (blame)
1
{"version":3,"sources":["../../../src/php/var/is_int.js"],"names":["module","exports","is_int","mixedVar","isFinite"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2B;AAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOA,aAAa,CAACA,QAAd,IAA0BC,SAASD,QAAT,CAA1B,IAAgD,EAAEA,WAAW,CAAb,CAAvD;AACD,CApBD","file":"is_int.js","sourcesContent":["module.exports = function is_int (mixedVar) { // eslint-disable-line camelcase\n  //  discuss at: http://locutus.io/php/is_int/\n  // original by: Alex\n  // improved by: Kevin van Zonneveld (http://kvz.io)\n  // improved by: WebDevHobo (http://webdevhobo.blogspot.com/)\n  // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n  //  revised by: Matt Bradley\n  // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n  //      note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes\n  //      note 1: it different from the PHP implementation. We can't fix this unfortunately.\n  //   example 1: is_int(23)\n  //   returns 1: true\n  //   example 2: is_int('23')\n  //   returns 2: false\n  //   example 3: is_int(23.5)\n  //   returns 3: false\n  //   example 4: is_int(true)\n  //   returns 4: false\n\n  return mixedVar === +mixedVar && isFinite(mixedVar) && !(mixedVar % 1)\n}\n"]}