aboutsummaryrefslogtreecommitdiff
path: root/node_modules/graceful-fs/clone.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/graceful-fs/clone.js')
-rw-r--r--node_modules/graceful-fs/clone.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/node_modules/graceful-fs/clone.js b/node_modules/graceful-fs/clone.js
deleted file mode 100644
index dff3cc8..0000000
--- a/node_modules/graceful-fs/clone.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict'
-
-module.exports = clone
-
-var getPrototypeOf = Object.getPrototypeOf || function (obj) {
- return obj.__proto__
-}
-
-function clone (obj) {
- if (obj === null || typeof obj !== 'object')
- return obj
-
- if (obj instanceof Object)
- var copy = { __proto__: getPrototypeOf(obj) }
- else
- var copy = Object.create(null)
-
- Object.getOwnPropertyNames(obj).forEach(function (key) {
- Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
- })
-
- return copy
-}