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.