src/components/history.js
function proposeFloat(value, defaultValue) {
  const proposed = parseFloat(value);
  if (typeof proposed === 'number' && isFinite(proposed)) {
    return proposed;
  }
  return defaultValue;
}
function proposeFloat(value, defaultValue) {
  const proposed = parseFloat(value);
  if (typeof proposed === 'number' && isFinite(proposed)) {
    return proposed;
  }
  return defaultValue;
}
Attempts to parse a given value as a floating point number.
@param {*} value The given value to try to parse.
@param {number} defaultValue The fallback value to return in case value cannot by parsed as float.

@returns {number} Value parsed as a float, or defaultValue,