Skip to content

Instantly share code, notes, and snippets.

@Delapouite
Created December 28, 2015 09:10
Show Gist options
  • Select an option

  • Save Delapouite/b528406356b3a89038db to your computer and use it in GitHub Desktop.

Select an option

Save Delapouite/b528406356b3a89038db to your computer and use it in GitHub Desktop.

Revisions

  1. Delapouite created this gist Dec 28, 2015.
    7 changes: 7 additions & 0 deletions bang.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    var _ = require('lodash')

    _.templateSettings.imports.bang = x => `${x}!`

    var compiled = _.template('<b><%= bang("foo") %></b>')

    console.log(compiled())