Use toPropertyKey in the "decorate" helper
This commit also makes the "toPropertyKey" helper call @@toPrimitive when needed.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
["external-helpers", { "helperVersion": "7.1.5" }],
|
||||
["transform-destructuring", { "useBuiltIns": true }],
|
||||
"transform-spread",
|
||||
"transform-parameters",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-destructuring", { "loose": true }],
|
||||
"proposal-object-rest-spread"
|
||||
"proposal-object-rest-spread",
|
||||
["external-helpers", { "helperVersion": "7.1.5" }]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,29 +1,20 @@
|
||||
function _toPropertyKey(key) { if (typeof key === "symbol") { return key; } else { return String(key); } }
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
||||
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
var z = {};
|
||||
|
||||
var _z = z,
|
||||
x = _extends({}, _z);
|
||||
|
||||
x = babelHelpers.extends({}, _z);
|
||||
var _z2 = z,
|
||||
x = _z2.x,
|
||||
y = _objectWithoutPropertiesLoose(_z2, ["x"]);
|
||||
|
||||
y = babelHelpers.objectWithoutPropertiesLoose(_z2, ["x"]);
|
||||
var _z3 = z,
|
||||
x = _z3[x],
|
||||
y = _objectWithoutPropertiesLoose(_z3, [x].map(_toPropertyKey));
|
||||
y = babelHelpers.objectWithoutPropertiesLoose(_z3, [x].map(babelHelpers.toPropertyKey));
|
||||
|
||||
(function (_ref) {
|
||||
let x = _ref.x,
|
||||
y = _objectWithoutPropertiesLoose(_ref, ["x"]);
|
||||
y = babelHelpers.objectWithoutPropertiesLoose(_ref, ["x"]);
|
||||
});
|
||||
|
||||
var _o = o;
|
||||
x = _o.x;
|
||||
y = _o.y;
|
||||
z = _objectWithoutPropertiesLoose(_o, ["x", "y"]);
|
||||
z = babelHelpers.objectWithoutPropertiesLoose(_o, ["x", "y"]);
|
||||
_o;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
["external-helpers", { "helperVersion": "7.1.5" }],
|
||||
"transform-destructuring",
|
||||
"transform-spread",
|
||||
"transform-parameters",
|
||||
|
||||
Reference in New Issue
Block a user