mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 20:51:42 +03:00
6 lines
140 B
JavaScript
6 lines
140 B
JavaScript
|
function foo(o, n) {
|
||
|
const t = o.get();
|
||
|
return t.map(({ [n]: o }) => o);
|
||
|
}
|
||
|
console.log(foo({ get: () => [{ blah: 42 }] }, "blah"));
|