Add supports for polyfill computed methods (#10398)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
var _map = "map";
|
||||
|
||||
object["filter"]; // polyfill
|
||||
object[_map]; // polyfill
|
||||
object[find]; // don't polyfill
|
||||
|
||||
object["filter"](); // polyfill
|
||||
object[_map](); // polyfill
|
||||
object[find](); // don't polyfill
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-runtime", { "corejs": { "version": 3, "proposals": true } }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
var _mapInstanceProperty = require("@babel/runtime-corejs3/core-js/instance/map");
|
||||
|
||||
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js/instance/filter");
|
||||
|
||||
var _map = "map";
|
||||
|
||||
_filterInstanceProperty(object); // polyfill
|
||||
|
||||
|
||||
_mapInstanceProperty(object); // polyfill
|
||||
|
||||
|
||||
object[find]; // don't polyfill
|
||||
|
||||
_filterInstanceProperty(object).call(object); // polyfill
|
||||
|
||||
|
||||
_mapInstanceProperty(object).call(object); // polyfill
|
||||
|
||||
|
||||
object[find](); // don't polyfill
|
||||
@@ -0,0 +1,5 @@
|
||||
var _isArray = "isArray";
|
||||
|
||||
Array["from"]; // polyfill
|
||||
Array[_isArray]; // polyfill
|
||||
Array[of]; // don't polyfill
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-runtime", { "corejs": { "version": 3, "proposals": true } }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
var _Array$isArray = require("@babel/runtime-corejs3/core-js/array/is-array");
|
||||
|
||||
var _Array$from = require("@babel/runtime-corejs3/core-js/array/from");
|
||||
|
||||
var _isArray = "isArray";
|
||||
_Array$from; // polyfill
|
||||
|
||||
_Array$isArray; // polyfill
|
||||
|
||||
Array[of]; // don't polyfill
|
||||
@@ -1 +1 @@
|
||||
bar[filter]()
|
||||
bar['filter']()
|
||||
|
||||
Reference in New Issue
Block a user