UNPKG

coldsky

Version:

Library and the app for BlueSky

9 lines (8 loc) 184 B
/** * @param {any} x * @returns {x is Promise<any>} */ export function isPromise(x) { if (!x || typeof x !== 'object') return false; else return typeof x.then === 'function'; }