'use strict';varisObject=require('is-extendable');module.exports=functionextend(o/*, objects*/){if(!isObject(o)){o={};}varlen=arguments.length;for(vari=1;i<len;i++){varobj=arguments[i];if(isObject(obj)){assign(o,obj);}}returno;};functionassign(a,b){for(varkeyinb){if(hasOwn(b,key)){a[key]=b[key];}}}/** * Returns true if the given `key` is an own property of `obj`. */functionhasOwn(obj,key){returnObject.prototype.hasOwnProperty.call(obj,key);}