mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
parent
7c62b7b043
commit
23a7ea9c85
2 changed files with 6 additions and 4 deletions
|
@ -44,14 +44,15 @@ let System, __instantiate;
|
|||
|
||||
function gE(exp) {
|
||||
return (id, v) => {
|
||||
v = typeof id === "string" ? { [id]: v } : id;
|
||||
for (const [id, value] of Object.entries(v)) {
|
||||
const e = typeof id === "string" ? { [id]: v } : id;
|
||||
for (const [id, value] of Object.entries(e)) {
|
||||
Object.defineProperty(exp, id, {
|
||||
value,
|
||||
writable: true,
|
||||
enumerable: true,
|
||||
});
|
||||
}
|
||||
return v;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue