1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

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

@ -16,7 +16,6 @@
import {
PRIVATE_USE_OFFSET_END, PRIVATE_USE_OFFSET_START, ProblematicCharRanges
} from '../../src/core/fonts';
import { isInt } from '../../src/shared/util';
/**
* Used to validate the entries in `ProblematicCharRanges`, and to ensure that
@ -41,7 +40,7 @@ var checkProblematicCharRanges = function checkProblematicCharRanges() {
lower: ProblematicCharRanges[i],
upper: ProblematicCharRanges[i + 1],
};
if (!isInt(limits.lower) || !isInt(limits.upper)) {
if (!Number.isInteger(limits.lower) || !Number.isInteger(limits.upper)) {
throw new Error('Range endpoints must be integers: ' +
printRange(limits));
}