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