varse

Parse variables in a string

Usage no npm install needed!

<script type="module">
  import varse from 'https://cdn.skypack.dev/varse';
</script>

README

varse

Varse is a super-simple module that parses variables in a string. That's all, for now.

Installation

$ npm install varse --save

Example

var varse = require('varse');

var str = varse('Hello, {{name}}!', {name: 'Jeff'});

console.log(str); // Hello, Jeff!

Configuration

There's currently only 1 configuration option available.

varse.configure({
  delims: ['<%=', '%>'] // Default: ['{{', '}}']
});

License

MIT