How to use the templateSettings function from underscore
Find comprehensive JavaScript underscore.templateSettings code examples handpicked from public code repositorys.
GitHub: ArVinD-005/RepoA
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355
// JavaScript micro-templating, similar to John Resig's implementation. // Underscore templating handles arbitrary delimiters, preserves whitespace, // and correctly escapes quotes within interpolated code. _.template = function(str, data) { var c = _.templateSettings; var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' + 'with(obj||{}){__p.push(\'' + str.replace(/\\/g, '\\\\') .replace(/'/g, "\\'")
+ 6 other calls in file
underscore.keys is the most popular function in underscore (11266 examples)