Checks if the input is a Promise-like object.
检查输入是否为 Promise 类似对象。
The type of the Promise resolution value / Promise 解析值的类型
The value to check. 要检查的值
True if the value is a Promise-like object, false otherwise. 如果值为 Promise 类似对象则返回 true,否则返回 false
This function checks if the value has a then method that is a function.
then
该函数检查值是否有 then 方法且该方法是一个函数。
isPromiseLike(Promise.resolve()) // => trueisPromiseLike({}) // => false Copy
isPromiseLike(Promise.resolve()) // => trueisPromiseLike({}) // => false
Checks if the input is a Promise-like object.
检查输入是否为 Promise 类似对象。