Works well as an arrow function due to not needing to turn it into a block body, although forEach and a comma would work too.
Object.mixin = (target, source) =>
Object.keys(source).reduce((target, key) =>
Object.defineProperty(target, key,
Object.getOwnPropertyDescriptor(source, key))
), target);
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

