swc/ecmascript/minifier/tests/exec/terser/harmony/issue_2349/input.js

6 lines
160 B
JavaScript
Raw Normal View History

function foo(boo, key) {
const value = boo.get();
return value.map(({ [key]: bar }) => bar);
}
console.log(foo({ get: () => [{ blah: 42 }] }, "blah"));