Skip to content

Release 0.11.0

Compare
Choose a tag to compare
@danielgtaylor danielgtaylor released this 14 Sep 10:03
· 384 commits to master since this release
  • BREAKING The public interface of the minim module has changed significantly. List of changes:

    • ElementRegistry has been renamed to Namespace.
    • minim has only one public method, called namespace, which creates a new Namespace instance.
    • minim.convertToElement is now namespace.toElement
    • minim.convertFromRefract is now namespace.fromRefract
    • minim.convertFromCompactRefract is now namespace.fromCompactRefract
    • minim.*Element are removed (except for namespace.BaseElement). These should be accessed via namespace.getElementClass('name') now.
    • The Namespace has a new method use 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 with noDefault set to false to the constructor. They can be initialized later via the useDefault 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.