@mantine/form
Version:
Mantine form management library
1 lines • 809 B
Source Map (JSON)
{"version":3,"file":"get-status.cjs","names":[],"sources":["../../src/get-status/get-status.ts"],"sourcesContent":["import { FormStatus } from '../types';\n\nexport function getStatus(status: FormStatus, path?: unknown) {\n const paths = Object.keys(status);\n\n if (typeof path === 'string') {\n const nestedPaths = paths.filter((statusPath) => statusPath.startsWith(`${path}.`));\n return status[path] || nestedPaths.some((statusPath) => status[statusPath]) || false;\n }\n\n return paths.some((statusPath) => status[statusPath]);\n}\n"],"mappings":";;AAEA,SAAgB,UAAU,QAAoB,MAAgB;CAC5D,MAAM,QAAQ,OAAO,KAAK,MAAM;CAEhC,IAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,cAAc,MAAM,QAAQ,eAAe,WAAW,WAAW,GAAG,KAAK,EAAE,CAAC;EAClF,OAAO,OAAO,SAAS,YAAY,MAAM,eAAe,OAAO,WAAW,KAAK;CACjF;CAEA,OAAO,MAAM,MAAM,eAAe,OAAO,WAAW;AACtD"}