diff options
Diffstat (limited to 'node_modules/mimic-fn/index.js')
-rw-r--r-- | node_modules/mimic-fn/index.js | 9 |
1 files changed, 9 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..08e69d3 --- /dev/null +++ b/node_modules/mimic-fn/index.js @@ -0,0 +1,9 @@ +'use strict'; +module.exports = (to, from) => { + // TODO: use `Reflect.ownKeys()` when targeting Node.js 6 + for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + + return to; +}; |