vue-admin-core
Version:
A Component Library for Vue 3
15 lines (13 loc) • 442 B
JavaScript
function isPromise(val) {
return val && typeof val.then === "function" && typeof val.catch === "function";
}
function findParentInstance(name, instance) {
if (!instance)
return null;
if ((instance == null ? void 0 : instance.type.name) !== name) {
return findParentInstance(name, instance == null ? void 0 : instance.parent);
}
return instance;
}
export { findParentInstance, isPromise };
//# sourceMappingURL=util.mjs.map