mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
c6b22c57f8
Co-authored-by: Fábio Santos <fabiosantosart@gmail.com>
17 lines
285 B
JavaScript
17 lines
285 B
JavaScript
function foo(boo, key) {
|
|
const value = boo.get();
|
|
return value.map(function ({ [key]: bar }) {
|
|
return bar;
|
|
});
|
|
}
|
|
console.log(
|
|
foo(
|
|
{
|
|
get: function () {
|
|
return [{ blah: 42 }];
|
|
},
|
|
},
|
|
"blah"
|
|
)
|
|
);
|