UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

8 lines (7 loc) 249 B
export function encode(ops, { stringOpcode = false } = {}) { const operations = []; const length = ops.length; for (let i = 0; i < length; i++) operations.push(ops[i].toCompact(undefined, stringOpcode)); return operations; }