0.17.0
Breaking
-
Element.toRefract()
andElement.fromRefract()
have been removed. JSON
Serialisation is now decoupled from the Element model. A minim namespace
provides a conveniencetoRefract(element)
andfromRefract(object)
methods. -
ArrayElement
children
method has been replaced by achildren
property
on all elements. You may now chain children in conjunction withfilter
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 toElement
. -
Embedded Refract support has been removed.
Enhancements
- All elements now contain a
children
andrecursiveChildren
properties that
return an ArrayElement of the respective children elements. - JSON Serialiser will no longer serialise empty
meta
andattributes
into
JSON objects. - Minim now contains a
RefElement
. - Element now contains a
toRef()
function to create a ref element referencing
the element.