From 3c51c3be85bb0d1bdb87ea0d6632f1c256912f27 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 6 Oct 2019 21:37:45 +0200 Subject: build: Add some required modules for node --- node_modules/mimic-fn/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 node_modules/mimic-fn/index.js (limited to 'node_modules/mimic-fn/index.js') 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; +}; -- cgit v1.2.3