diff options
Diffstat (limited to 'node_modules/mimic-fn/index.js')
-rw-r--r-- | node_modules/mimic-fn/index.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/node_modules/mimic-fn/index.js b/node_modules/mimic-fn/index.js new file mode 100644 index 000000000..9bf176367 --- /dev/null +++ b/node_modules/mimic-fn/index.js @@ -0,0 +1,7 @@ +'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)); + } +}; |