Skip to content

Commit

Permalink
add ESNext methods to ES3 workaround for Number constructor wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 30, 2020
1 parent 1d24b54 commit 79daf40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Changelog
##### Unreleased
- Added ESNext methods to ES3 workaround for `Number` constructor wrapper

##### 3.8.0 - 2020.11.26
- Added [relative indexing method stage 3 proposal](https://github.com/tc39/proposal-relative-indexing-method)
- `Array#at`
Expand Down
4 changes: 3 additions & 1 deletion packages/core-js/modules/es.number.constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumb
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES2015 (in case, if modules with ES2015 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
// ESNext
'fromString,range'
).split(','), j = 0, key; keys.length > j; j++) {
if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
Expand Down

0 comments on commit 79daf40

Please sign in to comment.