feige
2023-09-10 8319f67b9bec1d19c06eaa4216f0f34c67e3afb1
1
2
3
export default function isPromise(obj) {
  return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}