mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Replace the isInt
helper function with the native Number.isInteger
function
*Follow-up to PR 8643.*
This commit is contained in:
parent
066fea9c8b
commit
11408da340
12 changed files with 65 additions and 72 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue