Adjust spacing in template string expressions.

This commit is contained in:
John-David Dalton
2017-04-08 22:41:48 -07:00
parent 303502efa7
commit d10b44bdef
29 changed files with 90 additions and 90 deletions

View File

@@ -12,11 +12,11 @@ function createRound(methodName) {
if (precision) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
let pair = `${ number }e`.split('e')
const value = func(`${ pair[0] }e${ +pair[1] + precision }`)
let pair = `${number}e`.split('e')
const value = func(`${pair[0]}e${ +pair[1] + precision }`)
pair = `${ value }e`.split('e')
return +`${ pair[0] }e${ +pair[1] - precision }`
pair = `${value}e`.split('e')
return +`${pair[0]}e${+pair[1] - precision}`
}
return func(number)
}