interpolate-regex
Useful for basic templating by interpolating values into placeholders. Takes a left and right delimiter and returns a regex object for matching them and capturing the contents.
install
npm install interpolate-regex
example
const Regex = const data = place: 'world''Hello, {{place}}' // -> 'Hello, world'
API
Regex(left, right, matchEmpty)
left: string
left delimiterright: string
right delimitermatchEmpty: boolean, true
match when there is nothing in between delimiters