index.js 304B

12345678910
  1. 'use strict';
  2. module.exports = (to, from) => {
  3. // TODO: use `Reflect.ownKeys()` when targeting Node.js 6
  4. for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) {
  5. Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
  6. }
  7. return to;
  8. };