index.js 300 B

12345678910111213
  1. 'use strict';
  2. const mimicFn = (to, from) => {
  3. for (const prop of Reflect.ownKeys(from)) {
  4. Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
  5. }
  6. return to;
  7. };
  8. module.exports = mimicFn;
  9. // TODO: Remove this for the next major release
  10. module.exports.default = mimicFn;