UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

8 lines (7 loc) 508 B
import * as str from './str'; export declare const toStr: (buf: Uint8Array) => string; export declare const toBin: (hex: string) => Uint8Array; export declare const diff: (src: Uint8Array, dst: Uint8Array) => str.Patch; export declare const apply: (patch: str.Patch, srcLen: number, onInsert: (pos: number, str: Uint8Array) => void, onDelete: (pos: number, len: number) => void) => void; export declare const src: (patch: str.Patch) => Uint8Array; export declare const dst: (patch: str.Patch) => Uint8Array;