$ cnpm install smpltmpl
Simple templates for Node.js based on ECMAScript template literals syntax.
npm install --save smpltmpl
Using a string:
const { template } = require('smpltmpl');
console.log(template('Hello ${who}!', { who: 'templates' }));
Using a template file:
const { templateFromFile } = require('smpltmpl');
console.log(templateFromFile('template.txt', { who: 'templates' }));
The change log can be found on the Releases page.
Everyone is welcome to contribute. Please take a moment to review the contributing guidelines.
Artem Sapegin and contributors.
MIT License, see the included License.md file.
Copyright 2013 - present © cnpmjs.org | Home |