Skip to main content

parseNumber()

parseNumber(v, pno): any

Converts a string to a number. Uses native parseFloat if parseNumbers is "native", otherwise uses numeric-quantity. If that returns NaN, the string is returned unchanged. Numeric values are returned as-is regardless of the parseNumbers option.

Parameters

ParameterType
vany
pnoParseNumberOptions

Returns

any

Source

packages/react-querybuilder/src/utils/parseNumber.ts:18


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.