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

21 lines
463 B
JavaScript

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