const example = () => { const input = {}; const foo = 'foo'; var _input = input; ({ [`${foo}_bar`]: country } = _input); rest = babelHelpers.objectWithoutProperties(_input, [`${foo}_bar`]); _input; };