Files
dealplustech/node_modules/diff/libcjs/convert/dmp.js
Kunthawat 77ac4d2d05 feat: Upgrade to Astro with full PDPA compliance
PDPA Features:
 Cookie consent banner
 Consent logging API
 Admin dashboard
 Privacy Policy
 Terms & Conditions

Technical:
 Astro 5.x + Tailwind v4
 Docker on port 80
 SQLite database
 15 pages built

Ready for Easypanel deployment.
2026-03-12 10:01:04 +07:00

25 lines
699 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertChangesToDMP = convertChangesToDMP;
/**
* converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library
*/
function convertChangesToDMP(changes) {
var ret = [];
var change, operation;
for (var i = 0; i < changes.length; i++) {
change = changes[i];
if (change.added) {
operation = 1;
}
else if (change.removed) {
operation = -1;
}
else {
operation = 0;
}
ret.push([operation, change.value]);
}
return ret;
}