Const
Determine if input has a then function that accepts 2 arguments, matching the shape of a native Promise.
input
then
Promise
isPromiseLike(Promise.resolve(42)); // trueisPromiseLike({ then: () => {} }); // false Copy
isPromiseLike(Promise.resolve(42)); // trueisPromiseLike({ then: () => {} }); // false
Determine if
inputhas athenfunction that accepts 2 arguments, matching the shape of a nativePromise.