Skip to content

Commit 778e82b

Browse files
committed
add min-args filter to Number#toExponential
1 parent 68ce667 commit 778e82b

File tree

10 files changed

+55
-1
lines changed

10 files changed

+55
-1
lines changed

packages/core-js-compat/src/built-in-definitions.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ export const InstanceProperties = {
325325
test: { global: 'regexp/test' },
326326
toArray: { global: 'iterator/to-array' },
327327
toAsync: undefined,
328-
toExponential: undefined,
328+
toExponential: { global: {
329+
common: { dependencies: 'number/to-exponential', filters: [['min-args', 1]] },
330+
} },
329331
toFixed: undefined,
330332
toJSON: { global: 'date/to-json' },
331333
toReversed: 'instance/to-reversed',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
123.456.toExponential();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"plugins": [
3+
[
4+
"@core-js",
5+
{
6+
"method": "usage-global",
7+
"version": "4.0",
8+
"targets": {
9+
"ie": 11
10+
}
11+
}
12+
]
13+
]
14+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
123.456.toExponential();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
123.456.toExponential(arg);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"plugins": [
3+
[
4+
"@core-js",
5+
{
6+
"method": "usage-global",
7+
"version": "4.0",
8+
"targets": {
9+
"ie": 11
10+
}
11+
}
12+
]
13+
]
14+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import "core-js/modules/es.string.repeat";
2+
import "core-js/modules/es.number.to-exponential";
3+
123.456.toExponential(arg);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
123.456.toExponential;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"plugins": [
3+
[
4+
"@core-js",
5+
{
6+
"method": "usage-global",
7+
"version": "4.0",
8+
"targets": {
9+
"ie": 11
10+
}
11+
}
12+
]
13+
]
14+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import "core-js/modules/es.string.repeat";
2+
import "core-js/modules/es.number.to-exponential";
3+
123.456.toExponential;

0 commit comments

Comments
 (0)