How to use the @typewriter/editor.deepEqual function in @typewriter/editor

To help you get started, we’ve selected a few @typewriter/editor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github typewriter-editor / typewriter / packages / view-vdom / src / dom.ts View on Github external
oldChildren.forEach((next, i) => {
    const prev = children[children.length - 1];

    if (prev && typeof prev !== 'string' && typeof next !== 'string' && nodeMarks.get(prev) &&
      nodeMarks.get(prev) === nodeMarks.get(next) && deepEqual(prev.attributes, next.attributes))
    {
      prev.children = prev.children.concat(next.children);
    } else {
      children.push(next);
      if (prev && typeof prev !== 'string' && prev.children) {
        prev.children = mergeChildren(prev.children);
      }
    }
  });
  if (children.length) {

@typewriter/editor

The core editor for typewriter. Manages the data model and updates. Can be run headless.

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis