Releases: refractproject/minim
0.16.0
Breaking
- Node 0.10 and 0.12 are no longer supported.
- Elements
name
property was removed. There is no longer a name property in
Refract specification.
Enhancements
- Elements now provide a
findRecursive
method allowing you to recursively
find matching elements. - Added function for remove key in an Object element and Array element
Array Element
- New
isEmpty
convenience property for determining if an array is empty.
v0.15.0: Merge pull request #105 from refractproject/pksunkara/elements
- Getters of link element will now return an element
- Meta convenience methods will now return an element
Release v0.14.2
- Update Lodash version
Release v0.14.1
- Update Uptown to 0.4.1
Release 0.14.0
0.14.0 - 2016-04-28
- BREAKING The public interface of the
minim
module has changed significantly. List of changes:- Removed
toCompactRefract
andfromCompactRefract
- Improved the default refract serialization such that when an element in
attributes
has its own metadata or attributes defined then it will now be refracted when callingtoRefract
- Removed
Release 0.12.3
- When an element in
meta
has its own metadata or attributes defined then it will now be refracted when callingtoRefract
ortoCompactRefract
. - When loading from refract or compact refract, if an item in
meta
looks like an element it will be loaded as such. This may cause false positives.
Release 0.12.2
- Fix a bug related to setting the default key names that should be treated as refracted elements in element attributes. This is now accomplished via the namespace:
namespace._elementAttributeKeys.push('my-value');
. This fixes bugs related to overwriting thenamespace.BaseElement
.
Release 0.12.1
Fix a bug when loading refracted attributes from compact refract.
Release 0.12.0
-
Provide a way for elements to mark attributes as unrefracted arrays of
refracted elements. Subclassed elements can push onto the
_attributeElementArrayKeys
property to use this feature. Note: in the
future this feature may go away. -
Allow
load
to be used for plugins where a namespace is not being used -
Add an
elements
property to theNamespace
class which returns an object of PascalCased element name keys to registered element class values. This allows for ES6 use cases like:const {StringElement, ArrayElement, ObjectElement} = namespace.elements;
-
Add functionality for Embedded Refract
Release 0.11.0
-
BREAKING The public interface of the
minim
module has changed significantly. List of changes:ElementRegistry
has been renamed toNamespace
.minim
has only one public method, callednamespace
, which creates a newNamespace
instance.minim.convertToElement
is nownamespace.toElement
minim.convertFromRefract
is nownamespace.fromRefract
minim.convertFromCompactRefract
is nownamespace.fromCompactRefract
minim.*Element
are removed (except fornamespace.BaseElement
). These should be accessed vianamespace.getElementClass('name')
now.- The
Namespace
has a new methoduse
which loads a plugin namespace and is chainable, e.g.namespace.use(plugin1).use(plugin2)
. - A
Namespace
can be initialized without any default elements by passing an options object withnoDefault
set tofalse
to the constructor. They can be initialized later via theuseDefault
method.
Before:
var minim = require('minim'); minim.convertToElement([1, 2, 3]);
After:
var minim = require('minim'); var namespace = minim.namespace(); namespace.toElement([1, 2, 3]);
-
Add a
.toValue()
method to member elements which returns a hash with the key
and value and their respective values.