import { JsonCrdtDiff } from './JsonCrdtDiff';
export const diff = (src, dst) => {
    const diff = new JsonCrdtDiff(src.api.model);
    const patch = diff.diff(src.node, dst);
    return patch.ops.length ? patch : void 0;
};
export const merge = (src, dst) => {
    const patch = diff(src, dst);
    if (patch)
        src.api.model.applyPatch(patch);
    return patch;
};
//# sourceMappingURL=index.js.map