Skip to content

@longmo-utils/common / isRegExp

Function: isRegExp()

ts
function isRegExp(arg): boolean;

是否是正则

Parameters

ParameterTypeDescription
argany参数

Returns

boolean

true|false

Example

ts
isRegExp(/^\d+/) // true
isRegExp(new RegExp("\w")) // true

Released under the MIT License.