diff options
Diffstat (limited to 'node_modules/mimic-fn/index.js')
-rw-r--r-- | node_modules/mimic-fn/index.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/node_modules/mimic-fn/index.js b/node_modules/mimic-fn/index.js new file mode 100644 index 0000000..1a59705 --- /dev/null +++ b/node_modules/mimic-fn/index.js @@ -0,0 +1,13 @@ +'use strict'; + +const mimicFn = (to, from) => { + for (const prop of Reflect.ownKeys(from)) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + + return to; +}; + +module.exports = mimicFn; +// TODO: Remove this for the next major release +module.exports.default = mimicFn; |