aswi2020vldc-gitlab/templetes/node_modules/mimic-fn/index.js @ 9b6ff40e
1 | 3a515b92 | cagy | 'use strict'; |
---|---|---|---|
2 | |||
3 | const mimicFn = (to, from) => { |
||
4 | for (const prop of Reflect.ownKeys(from)) { |
||
5 | Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); |
||
6 | }
|
||
7 | |||
8 | return to; |
||
9 | };
|
||
10 | |||
11 | module.exports = mimicFn; |
||
12 | // TODO: Remove this for the next major release
|
||
13 | module.exports.default = mimicFn; |