import isFloat from './isFloat'; export default function toFloat(str) { if (!isFloat(str)) return NaN; return parseFloat(str); }