/*! * object-visit <https://github.com/jonschlinkert/object-visit> * * Copyright (c) 2015, 2017, Jon Schlinkert. * Released under the MIT License. */'use strict';varisObject=require('isobject');module.exports=functionvisit(thisArg,method,target,val){if(!isObject(thisArg)&&typeofthisArg!=='function'){thrownewError('object-visit expects `thisArg` to be an object.');}if(typeofmethod!=='string'){thrownewError('object-visit expects `method` name to be a string');}if(typeofthisArg[method]!=='function'){returnthisArg;}varargs=[].slice.call(arguments,3);target=target||{};for(varkeyintarget){vararr=[key,target[key]].concat(args);thisArg[method].apply(thisArg,arr);}returnthisArg;};