Skip to content

@longmo-utils/common / isPromise

Function: isPromise()

ts
function isPromise(arg): boolean;

是否是Promise

Parameters

ParameterTypeDescription
argany参数

Returns

boolean

true|false

Example

ts
isPromise(new Promise(()=>{})) // true

Released under the MIT License.