@fhaglund/replacevars

1.0.0 • Public • Published

replacevars

Simple key/value based variable replacement in strings.

Usage

const {replaceVars} = require('replacevars');

console.log(replaceVars('Your name is ${name} and you are ${age} years old. How do you do, ${name}?', {name: 'Sally', age: 26}));
// 'Your name is Sally and you are 26 years old. How do you do, Sally?'

Readme

Keywords

none

Package Sidebar

Install

npm i @fhaglund/replacevars

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

857 B

Total Files

3

Last publish

Collaborators

  • fhaglund