1.1.0 • Published 7 years ago

set-vars-by-obj v1.1.0

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

set-vars-by-obj

Sets variables into the string from given object.

Usage

Require the package in your main.js file (index.js, app.js ect.)

require('set-vars-by-obj');

The function will be set as a method of global String object.

'The name is {{lastName}}, {{name}} {{lastName}}!'.setVarsByObj({lastName:'Bond', name: 'James'});

The result will be

The name is Bond, James Bond!

Author

Hayk Karapetyan
hakarapet@gmail.com

Licence

MIT License
https://opensource.org/licenses/MIT