vue-admin-core
Version:
A Component Library for Vue 3
18 lines (15 loc) • 494 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;
}
exports.findParentInstance = findParentInstance;
exports.isPromise = isPromise;
//# sourceMappingURL=util.js.map