@aunz/simple-template
v0.0.4
Published
Simple template, replacing string with multiple matches
Downloads
14
Readme
simple-template
- installation
npm i @aunz/simple-template -S
- usage
import template from '@aunz/simple-template'
const text = template(`Hello, my name is {{name}}. I am {{age}} years old.`,{
name: 'Kitty',
age: 8
})
console.log(text)
//=> Hello, my name is Kitty. I am 8 years old.