OCA_Backend/api/node_modules/validator/es/lib/toFloat.js
2022-01-22 19:06:44 +05:30

5 lines
132 B
JavaScript

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