All the implicit returns
parent
5842ed1d1d
commit
33c32dcfeb
|
@ -79,18 +79,10 @@ const getRange = (
|
||||||
return [min, max]
|
return [min, max]
|
||||||
}
|
}
|
||||||
|
|
||||||
const parseNumber = bound => {
|
const coerceToNum = str => (str ? +str : null)
|
||||||
if (bound) {
|
export const getStackedRange = (bounds = [null, null]) => [
|
||||||
return +bound
|
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
|
export default getRange
|
||||||
|
|
Loading…
Reference in New Issue