Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 347 Bytes

.verb.md

File metadata and controls

18 lines (13 loc) · 347 Bytes

Usage

const Engine = require('{%= name %}');
const engine = new Engine();

// register helpers
engine.helper('titlecase', str => {
  return str.replace(/\b(\w)/g, (m, $1) => $)
});

const locals = { name: 'brian woodward' };
engine.render('Hi, <%= titlecase(name) %>!', locals); //=> 'Hi, BRIAN!'

API

{%= apidocs("index.js") %}