Skip to content

Commit b21ab31

Browse files
committed
Consolidate NumberIsInteger and ES.IsInteger in polyfill
We use the operation from es-abstract in some places, and a snapshot of Number.isInteger in others. Use IsInteger in order to correspond more with the spec text.
1 parent 10c0b11 commit b21ab31

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/ecmascript.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const MathTrunc = Math.trunc;
1111
const NumberIsNaN = Number.isNaN;
1212
const NumberIsFinite = Number.isFinite;
1313
const NumberMaxSafeInteger = Number.MAX_SAFE_INTEGER;
14-
const NumberIsInteger = Number.isInteger;
1514
const ObjectAssign = Object.assign;
1615
const ObjectCreate = Object.create;
1716
const ObjectDefineProperty = Object.defineProperty;
@@ -1819,7 +1818,7 @@ export const ES = ObjectAssign({}, ES2020, {
18191818
if (typeof offsetNs !== 'number') {
18201819
throw new TypeError('bad return from getOffsetNanosecondsFor');
18211820
}
1822-
if (!NumberIsInteger(offsetNs) || MathAbs(offsetNs) > 86400e9) {
1821+
if (!ES.IsInteger(offsetNs) || MathAbs(offsetNs) > 86400e9) {
18231822
throw new RangeError('out-of-range return from getOffsetNanosecondsFor');
18241823
}
18251824
return offsetNs;

0 commit comments

Comments
 (0)