Whitelist constructors aliasable to core-js
Expand the list of identifiers for which we substitute `_core.<Something>` for `<Something>`. Also an alternative fix for #421.
This commit is contained in:
7
test/fixtures/transformation/optional-core-aliasing/aliased-constructors/actual.js
vendored
Normal file
7
test/fixtures/transformation/optional-core-aliasing/aliased-constructors/actual.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
obj.constructor === Object;
|
||||
obj.constructor === Promise;
|
||||
|
||||
Symbol();
|
||||
Symbol("test");
|
||||
|
||||
new Map();
|
||||
@@ -6,5 +6,10 @@ var _interopRequire = function (obj) {
|
||||
|
||||
var _core = _interopRequire(require("core-js/library"));
|
||||
|
||||
_core.Symbol("test");
|
||||
obj.constructor === Object;
|
||||
obj.constructor === _core.Promise;
|
||||
|
||||
_core.Symbol();
|
||||
_core.Symbol("test");
|
||||
|
||||
new _core.Map();
|
||||
@@ -1 +0,0 @@
|
||||
obj.constructor === Object;
|
||||
@@ -1,9 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) {
|
||||
return obj && (obj["default"] || obj);
|
||||
};
|
||||
|
||||
var _core = _interopRequire(require("core-js/library"));
|
||||
|
||||
obj.constructor === Object;
|
||||
@@ -1,2 +0,0 @@
|
||||
Symbol("test");
|
||||
Symbol();
|
||||
Reference in New Issue
Block a user