All the implicit returns

pull/1957/head
Andrew Watkins 2017-09-01 11:12:02 -07:00
parent 5842ed1d1d
commit 33c32dcfeb
1 changed files with 5 additions and 13 deletions

View File

@ -79,18 +79,10 @@ const getRange = (
return [min, max]
}
const parseNumber = bound => {
if (bound) {
return +bound
}
const coerceToNum = str => (str ? +str : null)
export const getStackedRange = (bounds = [null, null]) => [
coerceToNum(bounds[0]),
coerceToNum(bounds[1]),
]
return null
}
export const getStackedRange = (bounds = [null, null]) => {
const min = bounds[0]
const max = bounds[1]
return [parseNumber(min), parseNumber(max)]
}
export default getRange