UNPKG

xe-utils

Version:

JavaScript 函数库、工具类

8 lines (6 loc) • 626 B
import staticParseInt from './staticParseInt.js';import helperNumberDecimal from './helperNumberDecimal.js';import helperStringReplace from './helperStringReplace.js';import helperMathPow from './helperMathPow.js';import toNumberString from './toNumberString.js';function helperMultiply (multiplier, multiplicand) { var str1 = toNumberString(multiplier) var str2 = toNumberString(multiplicand) return staticParseInt(helperStringReplace(str1, '.', '')) * staticParseInt(helperStringReplace(str2, '.', '')) / helperMathPow(10, helperNumberDecimal(str1) + helperNumberDecimal(str2)) } export default helperMultiply