Skip to main content

Home > blockly > utils > string > isNumber

utils.string.isNumber() function

Is the given string a number (includes negative and decimals).

Signature:

export declare function isNumber(str: string): boolean;

Parameters

ParameterTypeDescription
strstringInput string.

Returns:

boolean

True if number, false otherwise.