Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

stp

houzhanfeng154MIT0.0.4

基于 es6 模板字符串的超简模板引擎

es6, tmpl, stp

readme

describe('stp', function() {

  it('compile', function() {
    var fn = stp("hello ${name}");
    assert.equal(typeof fn, 'function');
    var rs = fn({ name: "word" });
    assert.equal(rs, 'hello word');
  });

  it('parse', function() {
    var rs = stp("hello ${name}", { name: "word" });
    assert.equal(rs, 'hello word');
  });

});