OCA_Backend/api/node_modules/validator/es/lib/toFloat.js

5 lines
132 B
JavaScript
Raw Permalink Normal View History

2022-01-22 13:36:44 +00:00
import isFloat from './isFloat';
export default function toFloat(str) {
if (!isFloat(str)) return NaN;
return parseFloat(str);
}