UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

29 lines (28 loc) 700 B
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