How to use the ferrum.flattenTree function in ferrum

To help you get started, we’ve selected a few ferrum 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 adobe / helix-pipeline / test / testFrontmatter.js View on Github external
it(wat, () => {
    const { proc } = procMd(md);
    // Discard position info
    const nodes = flattenTree(proc,
      (node, recurse) => concat([node], recurse(node.children || [])));
    each(nodes, (node) => {
      delete node.position;
    });
    assert.deepStrictEqual(proc.children, yaml.safeLoad(ast));
  });
};

ferrum

Features from the rust language in javascript: Provides Traits/Type classes & an advanced library for working with sequences/iterators in js.

Apache-2.0
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis