@dxos/echo
    Preparing search index...

    Function splice

    • Splice the string CRDT value at path by character index, mirroring Array.prototype.splice: remove deleteCount characters at start and insert insert. Returns the removed substring.

      Must be called inside Obj.update(obj, () => { ... }).

      Parameters

      • obj: Obj.Unknown
      • path: string | number | KeyPath
      • start: number
      • deleteCount: number
      • insert: string = ''

      Returns string

      O(delete count + insert length) CRDT splice.