Skip to main content

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

Parameter

Type

Description

str

string

Input string.

Returns:

boolean

True if number, false otherwise.