stp
基于 es6 模板字符串的超简模板引擎
Last updated 9 years ago by houzhanfeng .
MIT · Original npm · Tarball · package.json
$ cnpm install stp 
SYNC missed versions from official npm registry.
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');
  });

});

Current Tags

  • 0.0.4                                ...           latest (9 years ago)

4 Versions

  • 0.0.4                                ...           9 years ago
  • 0.0.3                                ...           9 years ago
  • 0.0.2                                ...           10 years ago
  • 0.0.1                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 3
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |