@mantine/form
Version:
Mantine form management library
17 lines (16 loc) • 582 B
JavaScript
"use client";
const require_get_splitted_path = require("./get-splitted-path.cjs");
//#region packages/@mantine/form/src/paths/get-path.ts
function getPath(path, values) {
const splittedPath = require_get_splitted_path.getSplittedPath(path);
if (splittedPath.length === 0 || typeof values !== "object" || values === null) return;
let value = values[splittedPath[0]];
for (let i = 1; i < splittedPath.length; i += 1) {
if (value == null) break;
value = value[splittedPath[i]];
}
return value;
}
//#endregion
exports.getPath = getPath;
//# sourceMappingURL=get-path.cjs.map