Lines Matching full:template
14 var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
16 /** Used to match empty string literals in compiled template source. */
22 * Used to validate the `validate` option in `_.template` variable.
35 …* [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexica…
39 /** Used to ensure capturing order of template delimiters. */
52 * Creates a compiled template function that can interpolate data properties
55 * properties may be accessed as free variables in the template. If a setting
58 * **Note:** In the development build `_.template` utilizes
72 * @param {string} [string=''] The template string.
79 * An object to import into the template as free variables.
83 * The sourceURL of the compiled template.
87 * @returns {Function} Returns the compiled template function.
90 * // Use the "interpolate" delimiter to create a compiled template.
91 * var compiled = _.template('hello <%= user %>!');
96 * var compiled = _.template('<b><%- value %></b>');
101 …* var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'…
106 * var compiled = _.template('<% print("hello " + user); %>!');
110 * // Use the ES template literal delimiter as an "interpolate" delimiter.
112 * var compiled = _.template('hello ${ user }!');
117 * var compiled = _.template('<%= "\\<%- value %\\>" %>');
123 * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
127 * // Use the `sourceURL` option to specify a custom sourceURL for the template.
128 * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
132 * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
133 * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
141 * // Use custom template delimiters.
143 * var compiled = _.template('hello {{ user }}!');
151 * "main": ' + _.template(mainText).source + '\
155 function template(string, options, guard) { function
272 module.exports = template;