Skip to content
On this page

Home > @taiyuuki/utils > MathRange > valid

MathRange.valid() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

验证数字区间是否合法,但不验证数字的大小。

Signature:

typescript
static valid(origin: string | number): boolean;
static valid(origin: string | number): boolean;

Parameters

ParameterTypeDescription
originstring | number一个数字区间的字符串,区分开区间和闭区间。

Returns:

boolean

验证结果

Released under the MIT License.