Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/validatorjs/validator.js
/ toFloat
Function
toFloat
src/lib/toFloat.js:3–7 ·
view source on GitHub ↗
(str)
Source
from the content-addressed store, hash-verified
1
import
isFloat from
'./isFloat'
;
2
3
export
default
function
toFloat(str) {
4
if
(!isFloat(str))
return
NaN;
5
6
return
parseFloat(str);
7
}
Callers
1
isDivisibleBy
Function · 0.85
Calls
1
isFloat
Function · 0.85
Tested by
no test coverage detected