Skip to content

v6.5.0

Compare
Choose a tag to compare
@miripiruni miripiruni released this 20 May 10:32
· 479 commits to master since this release

bemhtml.compile() and bemtree.compile() should work with arrow functions and function with name and params.

var bemhtml = require('bem-xjst').bemhtml;

var myFunction = function() {
    block('page').tag()('body');
};

// myFunction can be in v6.5.0:
//   function name() { … }
//   function (a, b) { … }
//   function name(a, b) { … }
//   () => { … }
//   (a, b) => { … }
//   _ => { … }

var templates = bemhtml.compile(myFunction);