linwenling
2023-07-24 228302bc93feabc7b51a965db4374781844cc033
1
2
3
export default function isPromise(obj) {
  return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}