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

19 lines
424 B
JavaScript

'use client';
import { getPath } from './get-path.mjs';
import { setPath } from './set-path.mjs';
function removePath(path, index, values) {
const currentValue = getPath(path, values);
if (!Array.isArray(currentValue)) {
return values;
}
return setPath(
path,
currentValue.filter((_, itemIndex) => itemIndex !== index),
values
);
}
export { removePath };
//# sourceMappingURL=remove-path.mjs.map