text-template
v1.0.3
Published
A simple string template function based on named or indexed arguments
Downloads
24
Maintainers
Readme
text-template
A simple string template function based on named or indexed arguments
Example
var format = require("text-template")
var interpolate
// Format using an object hash with keys matching [0-9a-zA-Z]+
interpolate = format("Hello {{title}} , This is {{template.name}}, with version {{template.version}}", {{
title: "Hemant Kumar",
templatae : {
name : "text-template",
version : "1.0.0"
}
}})
// interpolate -> "Hello Hemant Kumar, This is text-template, with version 1.0.0"
## Installation
`npm install text-template`
## Contributors
- Hemant Kumar