mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 12:01:00 +00:00
21 lines
463 B
JavaScript
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
|