piotr a64bf63639 [proposal-object-rest-spread] fix templateLiteral in extractNormalizedKeys (#9628)
Added additional check in extractNormalizedKeys function to handle templates differently than string.
2019-03-13 21:39:50 +01:00

13 lines
358 B
JavaScript

const input = {};
const _ref = prefix + 'state',
_ref2 = `${prefix}consents`,
{
given_name: givenName,
'last_name': lastName,
[`country`]: country,
[_ref]: state,
[_ref2]: consents
} = input,
rest = babelHelpers.objectWithoutProperties(input, ["given_name", "last_name", `country`, _ref, _ref2].map(babelHelpers.toPropertyKey));