aboutsummaryrefslogtreecommitdiff
path: root/node_modules/object-visit/index.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
commit0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch)
treef9864d4a4148621378958794cbbfdc2393733283 /node_modules/object-visit/index.js
parent6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff)
upgrade dependencies
Diffstat (limited to 'node_modules/object-visit/index.js')
-rw-r--r--node_modules/object-visit/index.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/node_modules/object-visit/index.js b/node_modules/object-visit/index.js
index 50b5800e7..fcaeda925 100644
--- a/node_modules/object-visit/index.js
+++ b/node_modules/object-visit/index.js
@@ -1,15 +1,15 @@
/*!
* object-visit <https://github.com/jonschlinkert/object-visit>
*
- * Copyright (c) 2015, Jon Schlinkert.
- * Licensed under the MIT License.
+ * Copyright (c) 2015, 2017, Jon Schlinkert.
+ * Released under the MIT License.
*/
'use strict';
var isObject = require('isobject');
-module.exports = function visit(thisArg, method, target) {
+module.exports = function visit(thisArg, method, target, val) {
if (!isObject(thisArg) && typeof thisArg !== 'function') {
throw new Error('object-visit expects `thisArg` to be an object.');
}
@@ -22,9 +22,12 @@ module.exports = function visit(thisArg, method, target) {
return thisArg;
}
+ var args = [].slice.call(arguments, 3);
target = target || {};
+
for (var key in target) {
- thisArg[method](key, target[key]);
+ var arr = [key, target[key]].concat(args);
+ thisArg[method].apply(thisArg, arr);
}
return thisArg;
};