Skip to content

Instantly share code, notes, and snippets.

@hasghari
Created April 19, 2013 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasghari/5421666 to your computer and use it in GitHub Desktop.
Save hasghari/5421666 to your computer and use it in GitHub Desktop.
underscore.js compatibility with Twitter Typeahead
_.mixin({
compile: function (str) {
var compiled = _.template(str);
compiled.render = function (context) {
return this(context);
};
return compiled;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment