synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
29 lines (28 loc) • 700 B
JavaScript
function t(o, f) {
const E = [];
return o.forEach((e) => {
if (e.type === "CREATE")
for (let d = e.fromRowIndex; d < e.toRowIndex; d++)
E.push({
type: "CREATE",
rowIndex: d,
rowData: f[d]
});
if (e.type === "UPDATE")
for (let d = e.fromRowIndex; d < e.toRowIndex; d++)
E.push({
type: "UPDATE",
rowIndex: d,
updatedData: f[d]
});
e.type === "DELETE" && E.push({
type: "DELETE",
rowIndex: e.fromRowIndex,
count: e.toRowIndex - e.fromRowIndex
});
}), E;
}
export {
t as mapOperationsToModelChanges
};
//# sourceMappingURL=mapOperationsToModelChanges.js.map