assets/src/services/crdt_linear.js
/**
 * Split given line at position at.
 *
 * @param {List<import('./char').Char>} line
 * @param {Number} at
 * @returns {[List<import('./char').Char>, List<import('./char').Char>]}
 */
Split given line at position at.
Split given line at position at .
function splitLineAt (line, at) {
  const before = line.slice(0, at).toList()
  const after = line.slice(at, line.size).toList()
  return [before, after]
}
function splitLineAt ( line , at ) { const before = line . slice ( 0 , at ) . toList ( ) const after = line . slice ( at , line . size ) . toList ( ) return [ before , after ] }
Split given line at position at.
Split given line at position at .