0.0.2 • Published 11 years ago

str-tpl v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
11 years ago

Installation

npm install str-tpl

Example

Replace that:

var str1 = 'concatenation';
var str2 = '5.016831';
//...
var s = 'Avoid string ' + str1 + '. In addition, you can apply inline number formatting like this: ' + parseFloat(str2).toFixed(2) + '\n'

by this:

var s = 'Avoid string {{str1}}. In addition, you can apply inline number formatting like this: {{str2|2}}\n'
        .tpl({str1:'concatenation', str2: '5.016831'}));