@wizard9/json-patch-apply
Version:
A library for describing, calculating, and applying patches to Javascript Objects.
33 lines (30 loc) • 1.21 kB
JavaScript
;
/**
This file is part of json-patch-apply.
json-patch-apply is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
json-patch-apply is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with json-patch-apply. If not, see <https://www.gnu.org/licenses/>.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Patch = void 0;
const diff_1 = require("./src/diff");
const apply_1 = require("./src/apply");
class Patch {
static diff(source, target) {
return this.generator.diff(source, target);
}
static apply(source, ...operations) {
return this.patch.apply(source, ...operations);
}
}
exports.Patch = Patch;
Patch.generator = new diff_1.PatchDiff();
Patch.patch = new apply_1.PatchApply();
//# sourceMappingURL=index.js.map