aboutsummaryrefslogtreecommitdiff
path: root/node_modules/fs-extra/lib/util/assign.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/fs-extra/lib/util/assign.js')
-rw-r--r--node_modules/fs-extra/lib/util/assign.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/fs-extra/lib/util/assign.js b/node_modules/fs-extra/lib/util/assign.js
new file mode 100644
index 0000000..317e5ec
--- /dev/null
+++ b/node_modules/fs-extra/lib/util/assign.js
@@ -0,0 +1,16 @@
+'use strict'
+
+// simple mutable assign
+function assign () {
+ const args = [].slice.call(arguments).filter(i => i)
+ const dest = args.shift()
+ args.forEach(src => {
+ Object.keys(src).forEach(key => {
+ dest[key] = src[key]
+ })
+ })
+
+ return dest
+}
+
+module.exports = assign