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
Parameter | Type | Description |
---|---|---|
origin | string | number | 一个数字区间的字符串,区分开区间和闭区间。 |
Returns:
boolean
验证结果