Replace the isInt helper function with the native Number.isInteger function

*Follow-up to PR 8643.*
This commit is contained in:
Jonas Jenwald 2017-09-01 16:52:50 +02:00
parent 066fea9c8b
commit 11408da340
12 changed files with 65 additions and 72 deletions

View file

@ -817,7 +817,7 @@ var Util = (function UtilClosure() {
* @return {string} The resulting Roman number.
*/
Util.toRoman = function Util_toRoman(number, lowerCase) {
assert(isInt(number) && number > 0,
assert(Number.isInteger(number) && number > 0,
'The number should be a positive integer.');
var pos, romanBuf = [];
// Thousands
@ -1075,10 +1075,6 @@ function isBool(v) {
return typeof v === 'boolean';
}
function isInt(v) {
return typeof v === 'number' && ((v | 0) === v);
}
function isNum(v) {
return typeof v === 'number';
}
@ -1703,7 +1699,6 @@ export {
isArrayBuffer,
isBool,
isEmptyObj,
isInt,
isNum,
isString,
isSpace,