@mantine/form
Version:
Mantine form management library
14 lines (13 loc) • 500 B
JavaScript
"use client";
//#region packages/@mantine/form/src/get-status/get-status.ts
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]);
}
//#endregion
exports.getStatus = getStatus;
//# sourceMappingURL=get-status.cjs.map