Files
Kadhirash SivakumarandGitHub ef8d761f0c fix: Preserve computed key evaluation order in nested object rest (#17576)
* fix: Preserve computed key evaluation order in nested object rest (#17274)

* fix: use inline memoization for computed keys to preserve eval order

* test: use distinct values to properly validate computed key ordering fix

* docs: update comments to reflect inline memoization approach

* refactor: remove redundant state flags and AST mutations

* fix: only memoize computed keys when rest elements are present

* refactor: address review feedback
2025-11-12 08:52:39 -05:00

11 lines
357 B
JavaScript

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