Skip to content

0.17.0

Compare
Choose a tag to compare
@kylef kylef released this 18 Jul 11:29
· 283 commits to master since this release

Breaking

  • Element.toRefract() and Element.fromRefract() have been removed. JSON
    Serialisation is now decoupled from the Element model. A minim namespace
    provides a convenience toRefract(element) and fromRefract(object)
    methods.

  • ArrayElement children method has been replaced by a children property
    on all elements. You may now chain children in conjunction with filter to
    get the existing behaviour.

    Before:

    const numbers = doc.children((element) => element.element == 'number');

    After:

    const numbers = doc.children.filter((element) => element.element == 'number');

    OR

    const numbers = doc.children.findByElement('number');
  • BaseElement has been renamed to Element.

  • Embedded Refract support has been removed.

Enhancements

  • All elements now contain a children and recursiveChildren properties that
    return an ArrayElement of the respective children elements.
  • JSON Serialiser will no longer serialise empty meta and attributes into
    JSON objects.
  • Minim now contains a RefElement.
  • Element now contains a toRef() function to create a ref element referencing
    the element.