openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
13 lines (12 loc) • 367 B
JavaScript
//#region packages/normalization-core/src/promise-like.ts
/** Canonical thenable guard; use instead of local isPromiseLike copies. */
function isPromiseLike(e) {
if (e === null || typeof e !== "object" && typeof e !== "function") return false;
try {
return typeof e.then === "function";
} catch {
return false;
}
}
//#endregion
export { isPromiseLike as t };