set-vars-by-obj
v1.1.0
Published
Sets variables into the string from given object
Downloads
2
Maintainers
Readme
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
[email protected]
Licence
MIT License
https://opensource.org/licenses/MIT