mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 12:01:00 +00:00
13 lines
425 B
JavaScript
13 lines
425 B
JavaScript
'use client';
|
|
function getStatus(status, path) {
|
|
const paths = Object.keys(status);
|
|
if (typeof path === "string") {
|
|
const nestedPaths = paths.filter((statusPath) => statusPath.startsWith(`${path}.`));
|
|
return status[path] || nestedPaths.some((statusPath) => status[statusPath]) || false;
|
|
}
|
|
return paths.some((statusPath) => status[statusPath]);
|
|
}
|
|
|
|
export { getStatus };
|
|
//# sourceMappingURL=get-status.mjs.map
|