varbaseToNumber=require('./_baseToNumber'),baseToString=require('./_baseToString');/** * Creates a function that performs a mathematical operation on two values. * * @private * @param {Function} operator The function to perform the operation. * @param {number} [defaultValue] The value used for `undefined` arguments. * @returns {Function} Returns the new mathematical operation function. */functioncreateMathOperation(operator,defaultValue){returnfunction(value,other){varresult;if(value===undefined&&other===undefined){returndefaultValue;}if(value!==undefined){result=value;}if(other!==undefined){if(result===undefined){returnother;}if(typeofvalue=='string'||typeofother=='string'){value=baseToString(value);other=baseToString(other);}else{value=baseToNumber(value);other=baseToNumber(other);}result=operator(value,other);}returnresult;};}module.exports=createMathOperation;