ileechee
ileechee
在模板数据中,未定义的根键值不存在时,并不会报错,但非根键值会正常提示错误。这是否一个缺陷?或者是我打开的方式不对...(使用中遇到有一个根键值名字输错,但没有报错或提示,然后找了很长时间) **版本**: [email protected] for browser ``` {{ foo }} // foo 未定义,但未报错,或提示foo未定义 var html = ''; html = template('test', {}); // foo未定义 document.write(html); ``` ``` {{ boo.foo }} // boo...
if it has a package at npm will be better. then,it could be easier to installed by npm, just like normalize.css.one more thing,if it could include more new CSS3 features...
模板中传入参数open始终会返回一个函数类型数据。请参考以下测试内容。 template: ` ${ open } ` js: `var testTpl = document.getElementById('test').innerHTML; var testData = {"open" : "Y"}; var html = juicer(testTpl, testData); console.log(html);` console: `function open() { [native code]...