MCPcopy Create free account
hub / github.com/PaulleDemon/PyUIBuilder / isNumeric

Function isNumeric

src/utils/common.js:56–60  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

54
55
56export function isNumeric(str) {
57 if (typeof str != "string") return false // we only process strings!
58 return !isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
59 !isNaN(parseFloat(str)) // ...and ensure strings of whitespace fail
60}
61
62
63/**

Callers 1

getRenderSizeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected