Files
emaui/node_modules/@mantine/form/esm/paths/get-path.mjs
2026-05-29 15:23:46 +03:00

21 lines
513 B
JavaScript

'use client';
import { getSplittedPath } from './get-splitted-path.mjs';
function getPath(path, values) {
const splittedPath = getSplittedPath(path);
if (splittedPath.length === 0 || typeof values !== "object" || values === null) {
return void 0;
}
let value = values[splittedPath[0]];
for (let i = 1; i < splittedPath.length; i += 1) {
if (value == null) {
break;
}
value = value[splittedPath[i]];
}
return value;
}
export { getPath };
//# sourceMappingURL=get-path.mjs.map