mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.0 KiB
37 lines
1.0 KiB
import DiffPatcher from './diffpatcher.js';
|
|
import dateReviver from './date-reviver.js';
|
|
export { DiffPatcher, dateReviver };
|
|
export function create(options) {
|
|
return new DiffPatcher(options);
|
|
}
|
|
let defaultInstance;
|
|
export function diff(left, right) {
|
|
if (!defaultInstance) {
|
|
defaultInstance = new DiffPatcher();
|
|
}
|
|
return defaultInstance.diff(left, right);
|
|
}
|
|
export function patch(left, delta) {
|
|
if (!defaultInstance) {
|
|
defaultInstance = new DiffPatcher();
|
|
}
|
|
return defaultInstance.patch(left, delta);
|
|
}
|
|
export function unpatch(right, delta) {
|
|
if (!defaultInstance) {
|
|
defaultInstance = new DiffPatcher();
|
|
}
|
|
return defaultInstance.unpatch(right, delta);
|
|
}
|
|
export function reverse(delta) {
|
|
if (!defaultInstance) {
|
|
defaultInstance = new DiffPatcher();
|
|
}
|
|
return defaultInstance.reverse(delta);
|
|
}
|
|
export function clone(value) {
|
|
if (!defaultInstance) {
|
|
defaultInstance = new DiffPatcher();
|
|
}
|
|
return defaultInstance.clone(value);
|
|
}
|
|
|