@babel/plugin-transform-proto-to-assign
var bar = { b: 2 };
bar.__proto__ = foo;
bar.a; // 1
foo.a = 2;
function _defaults(obj, defaults) { ... }
_defaults(bar, foo);
{
}
require("@babel/core").transformSync("code", {
plugins: ["@babel/plugin-transform-proto-to-assign"],
});