Skip to content

@longmo-utils/common / isError

Function: isError()

ts
function isError(arg): boolean;

是否是错误对象

Parameters

ParameterTypeDescription
argany参数

Returns

boolean

true|false

Example

ts
isError(new Error('122')) // true

Released under the MIT License.