Skip to content

Instantly share code, notes, and snippets.

@Delapouite
Created December 28, 2015 09:10
Show Gist options
  • Save Delapouite/b528406356b3a89038db to your computer and use it in GitHub Desktop.
Save Delapouite/b528406356b3a89038db to your computer and use it in GitHub Desktop.
_.templateSettings.import
var _ = require('lodash')
_.templateSettings.imports.bang = x => `${x}!`
var compiled = _.template('<b><%= bang("foo") %></b>')
console.log(compiled())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment