PageRenderTime 3642ms queryTime 142ms sortTime 3ms getByIdsTime 1360ms findMatchingLines 2033ms

100+ results results for 'underscore.js template' (3642 ms)

Not the results you expected?
underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 426 lines
                    
1// Underscore.js
                    
2// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.
                    
391  
                    
392  // Run Underscore.js in noConflict mode, returning the '_' variable to its
                    
393  // previous owner. Returns a reference to the Underscore object.
                    
407  // "Secrets of the Javascript Ninja", page 83.
                    
408  template : function(str, data) {
                    
409    var fn = new Function('obj', 
                    
                
index.js https://gitlab.com/KongMono/GuitarChord | JavaScript | 216 lines
                    
13    reInterpolate = require('lodash._reinterpolate'),
                    
14    templateSettings = require('lodash.templatesettings'),
                    
15    values = require('lodash.values');
                    
25 */
                    
26var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
27
                    
54 * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
                    
55 * @param {Object} [options.imports] An object to import into the template as local variables.
                    
56 * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
                    
81 * // using the internal `print` function in "evaluate" delimiters
                    
82 * _.template('<% print("hello " + name); %>!', { 'name': 'barney' });
                    
83 * // => 'hello barney!'
                    
124  // https://github.com/olado/doT
                    
125  var settings = templateSettings.imports._.templateSettings || templateSettings;
                    
126  text = String(text || '');
                    
                
index.js https://gitlab.com/boxnia/NFU_MOVIL | JavaScript | 1514 lines
                    
5 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
75
                    
76  /** Used to match empty string literals in compiled template source. */
                    
77  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
86
                    
87  /** Used to match template delimiters. */
                    
88  var reEscape = /<%-([\s\S]+?)%>/g,
                    
109
                    
110  /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
                    
111  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
127
                    
128  /** Used to ensure capturing order of template delimiters. */
                    
129  var reNoMatch = /($^)/;
                    
                
lodash.underscore.js https://gitlab.com/boxnia/NFU_MOVIL | JavaScript | 1626 lines
                    
3 * Lo-Dash 1.0.2 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
39
                    
40  /** Used to match empty string literals in compiled template source */
                    
41  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
55  /**
                    
56   * Used to match ES6 template delimiters
                    
57   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
58   */
                    
59  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
60
                    
                
lodash.js https://gitlab.com/boxnia/NFU_MOVIL | JavaScript | 1579 lines
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
42
                    
43  /** Used to match empty string literals in compiled template source */
                    
44  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
58  /**
                    
59   * Used to match ES6 template delimiters
                    
60   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
61   */
                    
62  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
63
                    
63
                    
64  /** Used to match "interpolate" template delimiters */
                    
65  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
                
lodash.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1449 lines
                    
5 * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
98
                    
99  /** Used to match empty string literals in compiled template source. */
                    
100  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
109
                    
110  /** Used to match template delimiters. */
                    
111  var reEscape = /<%-([\s\S]+?)%>/g,
                    
131
                    
132  /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
                    
133  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
158
                    
159  /** Used to ensure capturing order of template delimiters. */
                    
160  var reNoMatch = /($^)/;
                    
                
lodash.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1507 lines
                    
5 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
73
                    
74  /** Used to match empty string literals in compiled template source. */
                    
75  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
84
                    
85  /** Used to match template delimiters. */
                    
86  var reEscape = /<%-([\s\S]+?)%>/g,
                    
108
                    
109  /** Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components). */
                    
110  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
123
                    
124  /** Used to ensure capturing order of template delimiters. */
                    
125  var reNoMatch = /($^)/;
                    
                
lodash.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1522 lines
                    
5 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
73
                    
74  /** Used to match empty string literals in compiled template source. */
                    
75  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
84
                    
85  /** Used to match template delimiters. */
                    
86  var reEscape = /<%-([\s\S]+?)%>/g,
                    
95  /**
                    
96   * Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components).
                    
97   */
                    
97   */
                    
98  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
99
                    
                
lodash.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1526 lines
                    
5 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
73
                    
74  /** Used to match empty string literals in compiled template source. */
                    
75  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
84
                    
85  /** Used to match template delimiters. */
                    
86  var reEscape = /<%-([\s\S]+?)%>/g,
                    
90  /**
                    
91   * Used to match ES template delimiters.
                    
92   * See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components)
                    
94   */
                    
95  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
96
                    
                
lodash.compat.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1494 lines
                    
5 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
73
                    
74  /** Used to match empty string literals in compiled template source. */
                    
75  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
84
                    
85  /** Used to match template delimiters. */
                    
86  var reEscape = /<%-([\s\S]+?)%>/g,
                    
90  /**
                    
91   * Used to match ES template delimiters.
                    
92   * See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components)
                    
94   */
                    
95  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
96
                    
                
lodash.underscore.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1646 lines
                    
3 * Lo-Dash 2.4.2 (Custom Build) <https://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
23
                    
24  /** Used to match "interpolate" template delimiters */
                    
25  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
26
                    
27  /** Used to ensure capturing order of template delimiters */
                    
28  var reNoMatch = /($^)/;
                    
144  /**
                    
145   * Used by `template` to escape characters for inclusion in compiled
                    
146   * string literals.
                    
                
lodash.underscore.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1646 lines
                    
3 * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
23
                    
24  /** Used to match "interpolate" template delimiters */
                    
25  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
26
                    
27  /** Used to ensure capturing order of template delimiters */
                    
28  var reNoMatch = /($^)/;
                    
144  /**
                    
145   * Used by `template` to escape characters for inclusion in compiled
                    
146   * string literals.
                    
                
lodash.legacy.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1515 lines
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
45
                    
46  /** Used to match empty string literals in compiled template source */
                    
47  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
51  /**
                    
52   * Used to match ES6 template delimiters
                    
53   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals
                    
54   */
                    
55  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
56
                    
59
                    
60  /** Used to match "interpolate" template delimiters */
                    
61  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
                
lodash.underscore.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1650 lines
                    
3 * Lo-Dash 2.4.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
23
                    
24  /** Used to match "interpolate" template delimiters */
                    
25  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
26
                    
27  /** Used to ensure capturing order of template delimiters */
                    
28  var reNoMatch = /($^)/;
                    
144  /**
                    
145   * Used by `template` to escape characters for inclusion in compiled
                    
146   * string literals.
                    
                
lodash.underscore.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1648 lines
                    
3 * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
23
                    
24  /** Used to match "interpolate" template delimiters */
                    
25  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
26
                    
27  /** Used to ensure capturing order of template delimiters */
                    
28  var reNoMatch = /($^)/;
                    
137  /**
                    
138   * Used by `template` to escape characters for inclusion in compiled
                    
139   * string literals.
                    
                
lodash.compat.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1503 lines
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
45
                    
46  /** Used to match empty string literals in compiled template source */
                    
47  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
51  /**
                    
52   * Used to match ES6 template delimiters
                    
53   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
54   */
                    
55  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
56
                    
62
                    
63  /** Used to match "interpolate" template delimiters */
                    
64  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
                
lodash.underscore.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1649 lines
                    
3 * Lo-Dash 2.2.1 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
23
                    
24  /** Used to match "interpolate" template delimiters */
                    
25  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
26
                    
27  /** Used to ensure capturing order of template delimiters */
                    
28  var reNoMatch = /($^)/;
                    
137  /**
                    
138   * Used by `template` to escape characters for inclusion in compiled
                    
139   * string literals.
                    
                
lodash.underscore.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1650 lines
                    
3 * Lo-Dash 2.1.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
23
                    
24  /** Used to match "interpolate" template delimiters */
                    
25  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
26
                    
27  /** Used to ensure capturing order of template delimiters */
                    
28  var reNoMatch = /($^)/;
                    
140  /**
                    
141   * Used by `template` to escape characters for inclusion in compiled
                    
142   * string literals.
                    
                
lodash.underscore.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1651 lines
                    
3 * Lo-Dash 1.3.1 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
26
                    
27  /** Used to match empty string literals in compiled template source */
                    
28  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
35  /**
                    
36   * Used to match ES6 template delimiters
                    
37   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
38   */
                    
39  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
40
                    
                
lodash.underscore.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1626 lines
                    
3 * Lo-Dash 1.0.1 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
39
                    
40  /** Used to match empty string literals in compiled template source */
                    
41  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
55  /**
                    
56   * Used to match ES6 template delimiters
                    
57   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
58   */
                    
59  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
60
                    
                
lodash.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 1515 lines
                    
62
                    
63  /** Used to ensure capturing order of template delimiters */
                    
64  var reNoMatch = /($^)/;
                    
282   * By default, the template delimiters used by Lo-Dash are similar to those in
                    
283   * embedded Ruby (ERB). Change the following template settings to use alternative
                    
284   * delimiters.
                    
289   */
                    
290  lodash.templateSettings = {
                    
291
                    
302     *
                    
303     * @memberOf _.templateSettings
                    
304     * @type RegExp
                    
350   */
                    
351  var iteratorTemplate = template(
                    
352    // the `iterable` may be reassigned by the `top` snippet
                    
                
template-micro-coverage.js https://gitlab.com/Mirros/cdnjs | JavaScript | 318 lines
                    
25    calledFunctions: 0,
                    
26    path: "build/template-micro/template-micro.js",
                    
27    code: []
                    
28};
                    
29_yuitest_coverage["build/template-micro/template-micro.js"].code=["YUI.add('template-micro', function (Y, NAME) {","","/*jshint expr:true */","","/**","Adds the `Y.Template.Micro` template engine, which provides fast, simple","string-based micro-templating similar to ERB or Underscore templates.","","@module template","@submodule template-micro","@since 3.8.0","**/","","/**","Fast, simple string-based micro-templating engine similar to ERB or Underscore","templates.","","@class Template.Micro","@static","@since 3.8.0","**/","","// This code was heavily inspired by Underscore.js's _.template() method","// (written by Jeremy Ashkenas), which was in turn inspired by John Resig's","// micro-templating implementation.","","var Micro = Y.namespace('Template.Micro');","","/**","Default options for `Y.Template.Micro`.","","@property {Object} options","","    @param {RegExp} [options.code] Regex that matches code blocks like","        `<% ... %>`.","    @param {RegExp} [options.escapedOutput] Regex that matches escaped output","        tags like `<%= ... %>`.","    @param {RegExp} [options.rawOutput] Regex that matches raw output tags like","        `<%== ... %>`.","    @param {RegExp} [options.stringEscape] Regex that matches characters that","        need to be escaped inside single-quoted JavaScript string literals.","    @param {Object} [options.stringReplace] Hash that maps characters matched by","        `stringEscape` to the strings they should be replaced with. If you add","        a character to the `stringEscape` regex, you need to add it here too or","        it will be replaced with an empty string.","","@static","@since 3.8.0","**/","Micro.options = {","    code         : /<%([\\s\\S]+?)%>/g,","    escapedOutput: /<%=([\\s\\S]+?)%>/g,","    rawOutput    : /<%==([\\s\\S]+?)%>/g,","    stringEscape : /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g,","","    stringReplace: {","        '\\\\'    : '\\\\\\\\',","        \"'\"     : \"\\\\'\",","        '\\r'    : '\\\\r',","        '\\n'    : '\\\\n',","        '\\t'    : '\\\\t',","        '\\u2028': '\\\\u2028',","        '\\u2029': '\\\\u2029'","    }","};","","/**","Compiles a template string into a JavaScript function. Pass a data object to the","function to render the template using the given data and get back a rendered","string.","","Within a template, use `<%= ... %>` to output the value of an expression (where","`...` is the JavaScript expression or data variable to evaluate). The output","will be HTML-escaped by default. To output a raw value without escaping, use","`<%== ... %>`, but be careful not to do this with untrusted user input.","","To execute arbitrary JavaScript code within the template without rendering its","output, use `<% ... %>`, where `...` is the code to be executed. This allows the","use of if/else blocks, loops, function calls, etc., although it's recommended","that you avoid embedding anything beyond basic flow control logic in your","templates.","","Properties of the data object passed to a template function are made available","on a `data` variable within the scope of the template. So, if you pass in","the object `{message: 'hello!'}`, you can print the value of the `message`","property using `<%= data.message %>`.","","@example","","    YUI().use('template-micro', function (Y) {","        var template = '<ul class=\"<%= data.classNames.list %>\">' +","                           '<% Y.Array.each(data.items, function (item) { %>' +","                               '<li><%= item %></li>' +","                           '<% }); %>' +","                       '</ul>';","","        // Compile the template into a function.","        var compiled = Y.Template.Micro.compile(template);","","        // Render the template to HTML, passing in the data to use.","        var html = compiled({","            classNames: {list: 'demo'},","            items     : ['one', 'two', 'three', 'four']","        });","    });","","@method compile","@param {String} text Template text to compile.","@param {Object} [options] Options. If specified, these options will override the","    default options defined in `Y.Template.Micro.options`. See the documentation","    for that property for details on which options are available.","@return {Function} Compiled template function. Execute this function and pass in","    a data object to render the template with the given data.","@static","@since 3.8.0","**/","Micro.compile = function (text, options) {","    /*jshint evil:true */","","    var blocks     = [],","        tokenClose = \"\\uffff\",","        tokenOpen  = \"\\ufffe\",","        source;","","    options = Y.merge(Micro.options, options);","","    // Parse the input text into a string of JavaScript code, with placeholders","    // for code blocks. Text outside of code blocks will be escaped for safe","    // usage within a double-quoted string literal.","    //","    // $b is a blank string, used to avoid creating lots of string objects.","    //","    // $v is a function that returns the supplied value if the value is truthy","    // or the number 0, or returns an empty string if the value is falsy and not","    // 0.","    //","    // $t is the template string.","    source = \"var $b='', $v=function (v){return v || v === 0 ? v : $b;}, $t='\" +","","        // U+FFFE and U+FFFF are guaranteed to represent non-characters, so no","        // valid UTF-8 string should ever contain them. That means we can freely","        // strip them out of the input text (just to be safe) and then use them","        // for our own nefarious purposes as token placeholders!","        //","        // See http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Noncharacters","        text.replace(/\\ufffe|\\uffff/g, '')","","        .replace(options.rawOutput, function (match, code) {","            return tokenOpen + (blocks.push(\"'+\\n$v(\" + code + \")+\\n'\") - 1) + tokenClose;","        })","","        .replace(options.escapedOutput, function (match, code) {","            return tokenOpen + (blocks.push(\"'+\\n$e($v(\" + code + \"))+\\n'\") - 1) + tokenClose;","        })","","        .replace(options.code, function (match, code) {","            return tokenOpen + (blocks.push(\"';\\n\" + code + \"\\n$t+='\") - 1) + tokenClose;","        })","","        .replace(options.stringEscape, function (match) {","            return options.stringReplace[match] || '';","        })","","        // Replace the token placeholders with code.","        .replace(/\\ufffe(\\d+)\\uffff/g, function (match, index) {","            return blocks[parseInt(index, 10)];","        })","","        // Remove noop string concatenations that have been left behind.","        .replace(/\\n\\$t\\+='';\\n/g, '\\n') +","","        \"';\\nreturn $t;\";","","    // If compile() was called from precompile(), return precompiled source.","    if (options.precompile) {","        return \"function (Y, $e, data) {\\n\" + source + \"\\n}\";","    }","","    // Otherwise, return an executable function.","    return this.revive(new Function('Y', '$e', 'data', source));","};","","/**","Precompiles the given template text into a string of JavaScript source code that","can be evaluated later in another context (or on another machine) to render the","template.","","A common use case is to precompile templates at build time or on the server,","then evaluate the code on the client to render a template. The client only needs","to revive and render the template, avoiding the work of the compilation step.","","@method precompile","@param {String} text Template text to precompile.","@param {Object} [options] Options. If specified, these options will override the","    default options defined in `Y.Template.Micro.options`. See the documentation","    for that property for details on which options are available.","@return {String} Source code for the precompiled template.","@static","@since 3.8.0","**/","Micro.precompile = function (text, options) {","    options || (options = {});","    options.precompile = true;","","    return this.compile(text, options);","};","","/**","Compiles and renders the given template text in a single step.","","This can be useful for single-use templates, but if you plan to render the same","template multiple times, it's much better to use `compile()` to compile it once,","then simply call the compiled function multiple times to avoid recompiling.","","@method render","@param {String} text Template text to render.","@param {Object} data Data to pass to the template.","@param {Object} [options] Options. If specified, these options will override the","    default options defined in `Y.Template.Micro.options`. See the documentation","    for that property for details on which options are available.","@return {String} Rendered result.","@static","@since 3.8.0","**/","Micro.render = function (text, data, options) {","    return this.compile(text, options)(data);","};","","/**","Revives a precompiled template function into a normal compiled template function","that can be called to render the template. The precompiled function must already","have been evaluated to a function -- you can't pass raw JavaScript code to","`revive()`.","","@method revive","@param {Function} precompiled Precompiled template function.","@return {Function} Revived template function, ready to be rendered.","@static","@since 3.8.0","**/","Micro.revive = function (precompiled) {","    return function (data) {","        data || (data = {});","        return precompiled.call(data, Y, Y.Escape.html, data);","    };","};","","","}, '@VERSION@', {\"requires\": [\"escape\"]});"];
                    
30_yuitest_coverage["build/template-micro/template-micro.js"].lines = {"1":0,"27":0,"50":0,"117":0,"120":0,"125":0,"138":0,"149":0,"153":0,"157":0,"161":0,"166":0,"175":0,"176":0,"180":0,"201":0,"202":0,"203":0,"205":0,"225":0,"226":0,"241":0,"242":0,"243":0,"244":0};
                    
30_yuitest_coverage["build/template-micro/template-micro.js"].lines = {"1":0,"27":0,"50":0,"117":0,"120":0,"125":0,"138":0,"149":0,"153":0,"157":0,"161":0,"166":0,"175":0,"176":0,"180":0,"201":0,"202":0,"203":0,"205":0,"225":0,"226":0,"241":0,"242":0,"243":0,"244":0};
                    
31_yuitest_coverage["build/template-micro/template-micro.js"].functions = {"(anonymous 2):148":0,"(anonymous 3):152":0,"(anonymous 4):156":0,"(anonymous 5):160":0,"(anonymous 6):165":0,"compile:117":0,"precompile:201":0,"render:225":0,"(anonymous 7):242":0,"revive:241":0,"(anonymous 1):1":0};
                    
32_yuitest_coverage["build/template-micro/template-micro.js"].coveredLines = 25;
                    
32_yuitest_coverage["build/template-micro/template-micro.js"].coveredLines = 25;
                    
33_yuitest_coverage["build/template-micro/template-micro.js"].coveredFunctions = 11;
                    
34_yuitest_coverline("build/template-micro/template-micro.js", 1);
                    
56
                    
57// This code was heavily inspired by Underscore.js's _.template() method
                    
58// (written by Jeremy Ashkenas), which was in turn inspired by John Resig's
                    
                
template-micro-coverage.js https://gitlab.com/Mirros/cdnjs | JavaScript | 288 lines
                    
18}
                    
19_yuitest_coverage["build/template-micro/template-micro.js"] = {
                    
20    lines: {},
                    
28};
                    
29_yuitest_coverage["build/template-micro/template-micro.js"].code=["YUI.add('template-micro', function (Y, NAME) {","","/**","Adds the `Y.Template.Micro` template engine, which provides fast, simple","string-based micro-templating similar to ERB or Underscore templates.","","@module template","@submodule template-micro","@since 3.8.0","**/","","/**","Fast, simple string-based micro-templating engine similar to ERB or Underscore","templates.","","@class Template.Micro","@static","@since 3.8.0","**/","","// This code was heavily inspired by Underscore.js's _.template() method","// (written by Jeremy Ashkenas), which was in turn inspired by John Resig's","// micro-templating implementation.","","var Micro = Y.namespace('Template.Micro');","","/**","Default options for `Y.Template.Micro`.","","@property {Object} options","","    @param {RegExp} [options.code] Regex that matches code blocks like","        `<% ... %>`.","    @param {RegExp} [options.escapedOutput] Regex that matches escaped output","        tags like `<%= ... %>`.","    @param {RegExp} [options.rawOutput] Regex that matches raw output tags like","        `<%== ... %>`.","    @param {RegExp} [options.stringEscape] Regex that matches characters that","        need to be escaped inside single-quoted JavaScript string literals.","","@static","@since 3.8.0","**/","Micro.options = {","    code         : /<%([\\s\\S]+?)%>/g,","    escapedOutput: /<%=([\\s\\S]+?)%>/g,","    rawOutput    : /<%==([\\s\\S]+?)%>/g,","    stringEscape : /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g","};","","/**","Compiles a template string into a JavaScript function. Pass a data object to the","function to render the template using the given data and get back a rendered","string.","","Within a template, use `<%= ... %>` to output the value of an expression (where","`...` is the JavaScript expression or data variable to evaluate). The output","will be HTML-escaped by default. To output a raw value without escaping, use","`<%== ... %>`, but be careful not to do this with untrusted user input.","","To execute arbitrary JavaScript code within the template without rendering its","output, use `<% ... %>`, where `...` is the code to be executed. This allows the","use of if/else blocks, loops, function calls, etc., although it's recommended","that you avoid embedding anything beyond basic flow control logic in your","templates.","","Properties of the data object passed to a template function are made available","on a `data` variable within the scope of the template. So, if you pass in","the object `{message: 'hello!'}`, you can print the value of the `message`","property using `<%= data.message %>`.","","@example","","    YUI().use('template-micro', function (Y) {","        var template = '<ul class=\"<%= data.classNames.list %>\">' +","                           '<% Y.Array.each(data.items, function (item) { %>' +","                               '<li><%= item %></li>' +","                           '<% }); %>' +","                       '</ul>';","","        // Compile the template into a function.","        var compiled = Y.Template.Micro.compile(template);","","        // Render the template to HTML, passing in the data to use.","        var html = compiled({","            classNames: {list: 'demo'},","            items     : ['one', 'two', 'three', 'four']","        });","    });","","@method compile","@param {String} text Template text to compile.","@param {Object} [options] Options. If specified, these options will override the","    default options defined in `Y.Template.Micro.options`. See the documentation","    for that property for details on which options are available.","@return {Function} Compiled template function. Execute this function and pass in","    a data object to render the template with the given data.","@static","@since 3.8.0","**/","Micro.compile = function (text, options) {","    var blocks     = [],","        tokenClose = \"\\uffff\",","        tokenOpen  = \"\\ufffe\",","        source;","","    options = Y.merge(Micro.options, options);","","    // Parse the input text into a string of JavaScript code, with placeholders","    // for code blocks. Text outside of code blocks will be escaped for safe","    // usage within a double-quoted string literal.","    source = \"var $b='',$t='\" +","","        // U+FFFE and U+FFFF are guaranteed to represent non-characters, so no","        // valid UTF-8 string should ever contain them. That means we can freely","        // strip them out of the input text (just to be safe) and then use them","        // for our own nefarious purposes as token placeholders!","        //","        // See http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Noncharacters","        text.replace(/\\ufffe|\\uffff/g, '')","","        .replace(options.rawOutput, function (match, code) {","            return tokenOpen + (blocks.push(\"'+\\n((\" + code + \")||$b)+\\n'\") - 1) + tokenClose;","        })","","        .replace(options.escapedOutput, function (match, code) {","            return tokenOpen + (blocks.push(\"'+\\n$e((\" + code + \")||$b)+\\n'\") - 1) + tokenClose;","        })","","        .replace(options.code, function (match, code) {","            return tokenOpen + (blocks.push(\"';\\n\" + code + \"\\n$t+='\") - 1) + tokenClose;","        })","","        .replace(options.stringEscape, \"\\\\$&\")","","        // Replace the token placeholders with code.","        .replace(/\\ufffe(\\d+)\\uffff/g, function (match, index) {","            return blocks[parseInt(index, 10)];","        })","","        // Remove noop string concatenations that have been left behind.","        .replace(/\\n\\$t\\+='';\\n/g, '\\n') +","","        \"';\\nreturn $t;\";","","    // If compile() was called from precompile(), return precompiled source.","    if (options.precompile) {","        return \"function (Y, $e, data) {\\n\" + source + \"\\n}\";","    }","","    // Otherwise, return an executable function.","    return this.revive(new Function('Y', '$e', 'data', source));","};","","/**","Precompiles the given template text into a string of JavaScript source code that","can be evaluated later in another context (or on another machine) to render the","template.","","A common use case is to precompile templates at build time or on the server,","then evaluate the code on the client to render a template. The client only needs","to revive and render the template, avoiding the work of the compilation step.","","@method precompile","@param {String} text Template text to precompile.","@param {Object} [options] Options. If specified, these options will override the","    default options defined in `Y.Template.Micro.options`. See the documentation","    for that property for details on which options are available.","@return {String} Source code for the precompiled template.","@static","@since 3.8.0","**/","Micro.precompile = function (text, options) {","    options || (options = {});","    options.precompile = true;","","    return this.compile(text, options);","};","","/**","Compiles and renders the given template text in a single step.","","This can be useful for single-use templates, but if you plan to render the same","template multiple times, it's much better to use `compile()` to compile it once,","then simply call the compiled function multiple times to avoid recompiling.","","@method render","@param {String} text Template text to render.","@param {Object} data Data to pass to the template.","@param {Object} [options] Options. If specified, these options will override the","    default options defined in `Y.Template.Micro.options`. See the documentation","    for that property for details on which options are available.","@return {String} Rendered result.","@static","@since 3.8.0","**/","Micro.render = function (text, data, options) {","    return this.compile(text, options)(data);","};","","/**","Revives a precompiled template function into a normal compiled template function","that can be called to render the template. The precompiled function must already","have been evaluated to a function -- you can't pass raw JavaScript code to","`revive()`.","","@method revive","@param {Function} precompiled Precompiled template function.","@return {Function} Revived template function, ready to be rendered.","@static","@since 3.8.0","**/","Micro.revive = function (precompiled) {","    return function (data) {","        data || (data = {});","        return precompiled.call(data, Y, Y.Escape.html, data);","    };","};","","","}, '@VERSION@', {\"requires\": [\"escape\"]});"];
                    
30_yuitest_coverage["build/template-micro/template-micro.js"].lines = {"1":0,"25":0,"44":0,"101":0,"102":0,"107":0,"112":0,"123":0,"127":0,"131":0,"138":0,"147":0,"148":0,"152":0,"173":0,"174":0,"175":0,"177":0,"197":0,"198":0,"213":0,"214":0,"215":0,"216":0};
                    
31_yuitest_coverage["build/template-micro/template-micro.js"].functions = {"(anonymous 2):122":0,"(anonymous 3):126":0,"(anonymous 4):130":0,"(anonymous 5):137":0,"compile:101":0,"precompile:173":0,"render:197":0,"(anonymous 6):214":0,"revive:213":0,"(anonymous 1):1":0};
                    
32_yuitest_coverage["build/template-micro/template-micro.js"].coveredLines = 24;
                    
33_yuitest_coverage["build/template-micro/template-micro.js"].coveredFunctions = 10;
                    
146
                    
147    _yuitest_coverline("build/template-micro/template-micro.js", 107);
                    
148options = Y.merge(Micro.options, options);
                    
152    // usage within a double-quoted string literal.
                    
153    _yuitest_coverline("build/template-micro/template-micro.js", 112);
                    
154source = "var $b='',$t='" +
                    
                
underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 463 lines
                    
1// Underscore.js
                    
2// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.
                    
417  
                    
418  // Run Underscore.js in noConflict mode, returning the '_' variable to its
                    
419  // previous owner. Returns a reference to the Underscore object.
                    
438  // "Secrets of the JavaScript Ninja", page 83.
                    
439  _.template = function(st
                    
                
underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 460 lines
                    
1// Underscore.js
                    
2// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.
                    
415  
                    
416  // Run Underscore.js in noConflict mode, returning the '_' variable to its
                    
417  // previous owner. Returns a reference to the Underscore object.
                    
431  // "Secrets of the Javascript Ninja", page 83.
                    
432  _.template = function(str, data) {
                    
433    var fn = new Function('obj', 
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1650 lines
                    
3 * Lo-Dash 2.2.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
23
                    
24  /** Used to match "interpolate" template delimiters */
                    
25  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
26
                    
27  /** Used to ensure capturing order of template delimiters */
                    
28  var reNoMatch = /($^)/;
                    
137  /**
                    
138   * Used by `template` to escape characters for inclusion in compiled
                    
139   * string literals.
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1653 lines
                    
3 * Lo-Dash 2.0.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
23
                    
24  /** Used to match "interpolate" template delimiters */
                    
25  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
26
                    
27  /** Used to ensure capturing order of template delimiters */
                    
28  var reNoMatch = /($^)/;
                    
134  /**
                    
135   * Used by `template` to escape characters for inclusion in compiled
                    
136   * string literals.
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1651 lines
                    
3 * Lo-Dash 1.3.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
26
                    
27  /** Used to match empty string literals in compiled template source */
                    
28  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
35  /**
                    
36   * Used to match ES6 template delimiters
                    
37   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
38   */
                    
39  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
40
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1645 lines
                    
3 * Lo-Dash 1.2.1 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
38
                    
39  /** Used to match empty string literals in compiled template source */
                    
40  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
47  /**
                    
48   * Used to match ES6 template delimiters
                    
49   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
50   */
                    
51  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
52
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1651 lines
                    
3 * Lo-Dash 1.2.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
38
                    
39  /** Used to match empty string literals in compiled template source */
                    
40  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
47  /**
                    
48   * Used to match ES6 template delimiters
                    
49   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
50   */
                    
51  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
52
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1644 lines
                    
3 * Lo-Dash 1.1.1 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
32
                    
33  /** Used to match empty string literals in compiled template source */
                    
34  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
41  /**
                    
42   * Used to match ES6 template delimiters
                    
43   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
44   */
                    
45  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
46
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1641 lines
                    
3 * Lo-Dash 1.1.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
32
                    
33  /** Used to match empty string literals in compiled template source */
                    
34  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
41  /**
                    
42   * Used to match ES6 template delimiters
                    
43   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
44   */
                    
45  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
46
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1593 lines
                    
2 * Lo-Dash 1.0.0-rc.3 (Custom Build) <http://lodash.com>
                    
3 * Build: `lodash underscore -d -o ./lodash.underscore.js`
                    
4 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
5 * Based on Underscore.js 1.4.3 <http://underscorejs.org>
                    
6 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
33
                    
34  /** Used to detect template delimiter values that require a with-statement */
                    
35  var reComplexDelimiter = /[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/;
                    
39
                    
40  /** Used to match empty string literals in compiled template source */
                    
41  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
47
                    
48  /** Used to insert the data object variable into compiled template source */
                    
49  var reInsertVariable = /(?:__e|__t = )\(\s*(?![\d\s"']|this\.)/g;
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1548 lines
                    
49
                    
50  /** Used to insert the data object variable into compiled template source */
                    
51  var reInsertVariable = /(?:__e|__t = )\(\s*(?![\d\s"']|this\.)/g;
                    
60  /**
                    
61   * Used to match ES6 template delimiters
                    
62   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
266   * `mixin`, `noConflict`, `pop`, `random`, `reduce`, `reduceRight`, `result`,
                    
267   * `shift`, `size`, `some`, `sortedIndex`, `template`, `unescape`, and `uniqueId`
                    
268   *
                    
331     * @static
                    
332     * @memberOf _.templateSettings
                    
333     * @type String
                    
346   */
                    
347  var iteratorTemplate = template(
                    
348    // conditional strict mode
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1626 lines
                    
2 * Lo-Dash 1.0.0-rc.2 (Custom Build) <http://lodash.com>
                    
3 * Build: `lodash underscore -d -o ./lodash.underscore.js`
                    
4 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
5 * Based on Underscore.js 1.4.3 <http://underscorejs.org>
                    
6 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
33
                    
34  /** Used to detect template delimiter values that require a with-statement */
                    
35  var reComplexDelimiter = /[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/;
                    
39
                    
40  /** Used to match empty string literals in compiled template source */
                    
41  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
47
                    
48  /** Used to insert the data object variable into compiled template source */
                    
49  var reInsertVariable = /(?:__e|__t = )\(\s*(?![\d\s"']|this\.)/g;
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1622 lines
                    
2 * Lo-Dash 1.0.0-rc.1 (Custom Build) <http://lodash.com>
                    
3 * Build: `lodash underscore -d -o ./lodash.underscore.js`
                    
4 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
5 * Based on Underscore.js 1.4.2 <http://underscorejs.org>
                    
6 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
33
                    
34  /** Used to detect template delimiter values that require a with-statement */
                    
35  var reComplexDelimiter = /[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/;
                    
39
                    
40  /** Used to match empty string literals in compiled template source */
                    
41  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
47
                    
48  /** Used to insert the data object variable into compiled template source */
                    
49  var reInsertVariable = /(?:__e|__t = )\(\s*(?![\d\s"']|this\.)/g;
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1605 lines
                    
35
                    
36  /** Used to detect template delimiter values that require a with-statement */
                    
37  var reComplexDelimiter = /[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/;
                    
60  /**
                    
61   * Used to match ES6 template delimiters
                    
62   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
84  /** Used to make template sourceURLs easier to identify */
                    
85  var templateCounter = 0;
                    
86
                    
266  /**
                    
267   * By default, the template delimiters used by Lo-Dash are similar to those in
                    
268   * embedded Ruby (ERB). Change the following template settings to use alternative
                    
341   */
                    
342  var iteratorTemplate = template(
                    
343    // conditional strict mode
                    
                
lodash.underscore.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1627 lines
                    
3 * Lo-Dash 1.0.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash underscore -o ./dist/lodash.underscore.js`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
36
                    
37  /** Used to match empty string literals in compiled template source */
                    
38  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
52  /**
                    
53   * Used to match ES6 template delimiters
                    
54   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
55   */
                    
56  var reEsTemplate = /\$\{((?:(?=\\?)\\?[\s\S])*?)\}/g;
                    
57
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1581 lines
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
39
                    
40  /** Used to match empty string literals in compiled template source */
                    
41  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
55  /**
                    
56   * Used to match ES6 template delimiters
                    
57   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
58   */
                    
59  var reEsTemplate = /\$\{((?:(?=\\?)\\?[\s\S])*?)\}/g;
                    
60
                    
60
                    
61  /** Used to match "interpolate" template delimiters */
                    
62  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1609 lines
                    
3 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * Based on Underscore.js 1.4.2 <http://underscorejs.org>
                    
5 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
73
                    
74  /** Used to make template sourceURLs easier to identify */
                    
75  var templateCounter = 0;
                    
245   * By default, the template delimiters used by Lo-Dash are similar to those in
                    
246   * embedded Ruby (ERB). Change the following template settings to use alternative
                    
247   * delimiters.
                    
258     * @static
                    
259     * @memberOf _.templateSettings
                    
260     * @type RegExp
                    
300   */
                    
301  var iteratorTemplate = template(
                    
302    // conditional strict mode
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1547 lines
                    
3 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * Based on Underscore.js 1.4.1 <http://underscorejs.org>
                    
5 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
69
                    
70  /** Used to make template sourceURLs easier to identify */
                    
71  var templateCounter = 0;
                    
254   * By default, the template delimiters used by Lo-Dash are similar to those in
                    
255   * embedded Ruby (ERB). Change the following template settings to use alternative
                    
256   * delimiters.
                    
267     * @static
                    
268     * @memberOf _.templateSettings
                    
269     * @type RegExp
                    
309   */
                    
310  var iteratorTemplate = template(
                    
311    // conditional strict mode
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1544 lines
                    
3 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * Based on Underscore.js 1.4.0 <http://underscorejs.org>
                    
5 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
69
                    
70  /** Used to make template sourceURLs easier to identify */
                    
71  var templateCounter = 0;
                    
254   * By default, the template delimiters used by Lo-Dash are similar to those in
                    
255   * embedded Ruby (ERB). Change the following template settings to use alternative
                    
256   * delimiters.
                    
267     * @static
                    
268     * @memberOf _.templateSettings
                    
269     * @type RegExp
                    
309   */
                    
310  var iteratorTemplate = template(
                    
311    // conditional strict mode
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1516 lines
                    
25   * Used to match potentially incorrect data object references, like `obj.obj`,
                    
26   * in compiled templates. Assigned in `_.template`.
                    
27   */
                    
31   * Used to match "evaluate" delimiters, including internal delimiters,
                    
32   * in template text. Assigned in `_.template`.
                    
33   */
                    
97
                    
98  /** Used to replace template delimiters */
                    
99  var tokenHead = '__token',
                    
317  /**
                    
318   * By default, the template delimiters used by Lo-Dash are similar to those in
                    
319   * embedded Ruby (ERB). Change the following template settings to use alternative
                    
373   */
                    
374  var iteratorTemplate = template(
                    
375    // conditional strict mode
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1512 lines
                    
25   * Used to match potentially incorrect data object references, like `obj.obj`,
                    
26   * in compiled templates. Assigned in `_.template`.
                    
27   */
                    
31   * Used to match "evaluate" delimiters, including internal delimiters,
                    
32   * in template text. Assigned in `_.template`.
                    
33   */
                    
91
                    
92  /** Used to replace template delimiters */
                    
93  var token = '__token__';
                    
269  /**
                    
270   * By default, the template delimiters used by Lo-Dash are similar to those in
                    
271   * embedded Ruby (ERB). Change the following template settings to use alternative
                    
325   */
                    
326  var iteratorTemplate = template(
                    
327    // conditional strict mode
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1529 lines
                    
25   * Used to match potentially incorrect data object references, like `obj.obj`,
                    
26   * in compiled templates. Assigned in `_.template`.
                    
27   */
                    
31   * Used to match "evaluate" delimiters, including internal delimiters,
                    
32   * in template text. Assigned in `_.template`.
                    
33   */
                    
85
                    
86  /** Used to replace template delimiters */
                    
87  var token = '__token__';
                    
212  /**
                    
213   * By default, Lo-Dash uses embedded Ruby (ERB) style template delimiters,
                    
214   * change the following template settings to use alternative delimiters.
                    
267   */
                    
268  var iteratorTemplate = template(
                    
269    // conditional strict mode
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1530 lines
                    
25   * Used to match potentially incorrect data object references, like `obj.obj`,
                    
26   * in compiled templates. Assigned in `_.template`.
                    
27   */
                    
31   * Used to match "evaluate" delimiters, including internal delimiters,
                    
32   * in template text. Assigned in `_.template`.
                    
33   */
                    
85
                    
86  /** Used to replace template delimiters */
                    
87  var token = '__token__';
                    
212  /**
                    
213   * By default, Lo-Dash uses embedded Ruby (ERB) style template delimiters,
                    
214   * change the following template settings to use alternative delimiters.
                    
267   */
                    
268  var iteratorTemplate = template(
                    
269    // assign the `result` variable an initial value
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1534 lines
                    
25   * Used to match potentially incorrect data object references, like `obj.obj`,
                    
26   * in compiled templates. Assigned in `_.template`.
                    
27   */
                    
31   * Used to match "evaluate" delimiters, including internal delimiters,
                    
32   * in template text. Assigned in `_.template`.
                    
33   */
                    
88  /** Used to make template sourceURLs easier to identify */
                    
89  var templateCounter = 0;
                    
90
                    
93
                    
94  /** Used to store tokenized template text snippets */
                    
95  var tokenized = [];
                    
272   */
                    
273  var iteratorTemplate = template(
                    
274    // assign the `result` variable an initial value
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1595 lines
                    
48  /** Used to make template sourceURLs easier to identify */
                    
49  var templateCounter = 0;
                    
50
                    
167   */
                    
168  lodash.templateSettings = {
                    
169
                    
182     * @static
                    
183     * @memberOf _.templateSettings
                    
184     * @type RegExp
                    
191     * @static
                    
192     * @memberOf _.templateSettings
                    
193     * @type RegExp
                    
215   */
                    
216  var iteratorTemplate = template(
                    
217    // assign the `result` variable an initial value
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1611 lines
                    
48  /** Used to make template sourceURLs easier to identify */
                    
49  var templateCounter = 0;
                    
50
                    
50
                    
51  /** Used to replace template delimiters */
                    
52  var token = '__token__';
                    
53
                    
54  /** Used to store tokenized template text snippets */
                    
55  var tokenized = [];
                    
209   */
                    
210  var iteratorTemplate = template(
                    
211    // assign the `result` variable an initial value
                    
434        'stringClass, toString, undefined',
                    
435      '"use strict"; return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
                    
436    );
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1579 lines
                    
50
                    
51  /** Used to replace template delimiters */
                    
52  var token = '__token__';
                    
53
                    
54  /** Used to store tokenized template text snippets */
                    
55  var tokenized = [];
                    
167     * @static
                    
168     * @memberOf _.templateSettings
                    
169     * @type RegExp
                    
209   */
                    
210  var iteratorTemplate = template(
                    
211    // assign the `result` variable an initial value
                    
458  /**
                    
459   * Used by `template()` to replace tokens with their corresponding code snippets.
                    
460   *
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1586 lines
                    
65
                    
66  /** Used to replace template delimiters */
                    
67  var token = '__token__';
                    
68
                    
69  /** Used to store tokenized template text snippets */
                    
70  var tokenized = [];
                    
175     * @static
                    
176     * @memberOf _.templateSettings
                    
177     * @type String
                    
190   */
                    
191  var iteratorTemplate = template(
                    
192    // assign the `result` variable an initial value
                    
460  /**
                    
461   * Used by `template()` to replace "escape" template delimiters with tokens.
                    
462   *
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1561 lines
                    
72
                    
73  /** Used to match the "escape" template delimiters */
                    
74  var reEscapeDelimiter = /<%-([\s\S]+?)%>/g;
                    
75
                    
76  /** Used to match the "evaluate" template delimiters */
                    
77  var reEvaluateDelimiter = /<%([\s\S]+?)%>/g;
                    
78
                    
79  /** Used to match the "interpolate" template delimiters */
                    
80  var reInterpolateDelimiter = /<%=([\s\S]+?)%>/g;
                    
89
                    
90  /** Used to match unescaped characters in template text */
                    
91  var reUnescaped = /['\n\r\t\u2028\u2029\\]/g;
                    
146   */
                    
147  var iteratorTemplate = template(
                    
148    // assign the `result` variable an initial value
                    
                
lodash.js https://gitlab.com/Mirros/cdnjs | JavaScript | 1519 lines
                    
3 * Copyright 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * Based on Underscore.js 1.3.3, copyright 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
5 * <http://documentcloud.github.com/underscore>
                    
10
                    
11  /** Used to escape and unescape characters in templates */
                    
12  var escapes = {
                    
42  /**
                    
43   * Used for `templateSettings` properties such as `escape`, `evaluate`,
                    
44   * or `interpolate` with explicitly assigned falsey values to ensure no match
                    
336   * literals, so they may compiled into function bodies.
                    
337   * (Used for template interpolation, evaluation, or escaping)
                    
338   *
                    
                
lodash.js https://gitlab.com/DGuedes/Angular2Playground | JavaScript | 1464 lines
                    
5 * Released under MIT license <https://lodash.com/license>
                    
6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
7 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
99
                    
100  /** Used to match empty string literals in compiled template source. */
                    
101  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
110
                    
111  /** Used to match template delimiters. */
                    
112  var reEscape = /<%-([\s\S]+?)%>/g,
                    
140   * Used to match
                    
141   * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components).
                    
142   */
                    
142   */
                    
143  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
144
                    
                
underscore.d.ts https://gitlab.com/iyulab/MvsWebSeed | TypeScript Typings | 1573 lines
                    
7	/**
                    
8	* underscore.js _.throttle options.
                    
9	**/
                    
23	/**
                    
24	* underscore.js template settings, set templateSettings or pass as an argument
                    
25	* to 'template()' to override defaults.
                    
26	**/
                    
27	interface TemplateSettings {
                    
28		/**
                    
                
backbone.marionette.js https://gitlab.com/Blueprint-Marketing/cdnjs | JavaScript | 1164 lines
                    
101    if (this.options && this.options.template){
                    
102      template = this.options.template;
                    
103    } else {
                    
137    target = target || {};
                    
138    var templateHelpers = this.templateHelpers;
                    
139    if (_.isFunction(templateHelpers)){
                    
210// A single item view implementation that contains code for rendering
                    
211// with underscore.js templates, serializing the view's model or collection,
                    
212// and calling several methods on extended views, such as `onRender`.
                    
227
                    
228  // Render the view, defaulting to underscore.js templates.
                    
229  // You can override this in your view definition to provide
                    
238    var data = this.serializeData();
                    
239    var template = this.getTemplate();
                    
240    var html = Marionette.Renderer.render(template, data);
                    
                
backbone.marionette.js https://gitlab.com/Blueprint-Marketing/cdnjs | JavaScript | 1066 lines
                    
87    } else {
                    
88      template = this.template;
                    
89    }
                    
194// A single item view implementation that contains code for rendering
                    
195// with underscore.js templates, serializing the view's model or collection,
                    
196// and calling several methods on extended views, such as `onRender`.
                    
211
                    
212  // Render the view, defaulting to underscore.js templates.
                    
213  // You can override this in your view definition to provide
                    
222    var data = this.serializeData();
                    
223    var template = this.getTemplate();
                    
224    var html = Marionette.Renderer.render(template, data);
                    
485
                    
486    var template = this.getTemplate();
                    
487    return Marione
                    
                
backbone.marionette.js https://gitlab.com/Blueprint-Marketing/cdnjs | JavaScript | 1014 lines
                    
35      if (_.isFunction(template)){
                    
36        template  = template.call(this);
                    
37      }
                    
134  // A single item view implementation that contains code for rendering
                    
135  // with underscore.js templates, serializing the view's model or collection,
                    
136  // and calling several methods on extended views, such as `onRender`.
                    
155
                    
156    // Render the view, defaulting to underscore.js templates.
                    
157    // You can override this in your view definition.
                    
196    renderHtml: function(data) {
                    
197      var template = this.getTemplateSelector();
                    
198      return Marionette.Renderer.render(template, data);
                    
429
                    
430      var template = this.getTemplateSelector();
                    
431      return Marionette.Renderer.render(template, data);
                    
                
backbone.marionette.js https://gitlab.com/Blueprint-Marketing/cdnjs | JavaScript | 841 lines
                    
45      if (this.options && this.options.template){
                    
46        template = this.options.template;
                    
47      } else {
                    
47      } else {
                    
48        template = this.template;
                    
49      }
                    
78  // A single item view implementation that contains code for rendering
                    
79  // with underscore.js templates, serializing the view's model or collection,
                    
80  // and calling several methods on extended views, such as `onRender`.
                    
116
                    
117    // Render the view, defaulting to underscore.js templates.
                    
118    // You can override this in your view definition.
                    
371
                    
372      var template = this.getTemplateSelector();
                    
373      return Marionette.Renderer.render(template, data);
                    
                
utility.js https://gitlab.com/pidlisnyi/lisbon | JavaScript | 420 lines
                    
7    beforeEach: function() {
                    
8      templateSettings = _.clone(_.templateSettings);
                    
9    },
                    
11    afterEach: function() {
                    
12      _.templateSettings = templateSettings;
                    
13    }
                    
214
                    
215    var escapedCharsInJavascriptTemplate = _.template('<ul><% _.each(numbers.split("\\n"), function(item) { %><li><%= item %></li><% }) %></ul>');
                    
216    result = escapedCharsInJavascriptTemplate({numbers: 'one\ntwo\nthree\nfour'});
                    
254
                    
255    template = _.template('\n ' +
                    
256    '  <%\n ' +
                    
299
                    
300    var templateWithNull = _.template('a null undefined {{planet}}');
                    
301    assert.equal(templateWithNull({planet: 'world'}), 'a null undefined world', 'can handle missing escape and evaluate settings');
                    
                
lex.js https://gitlab.com/nVySin/Mo_Grabber | JavaScript | 1843 lines
                    
31  RegExp: 9,
                    
32  TemplateHead: 10,
                    
33  TemplateMiddle: 11,
                    
33  TemplateMiddle: 11,
                    
34  TemplateTail: 12,
                    
35  NoSubstTemplate: 13
                    
39  Block: 1,
                    
40  Template: 2
                    
41};
                    
120  this.context = [];
                    
121  this.templateStarts = [];
                    
122
                    
179   * Subscribe to a token event. The API for this method is similar
                    
180   * Underscore.js i.e. you can subscribe to multiple events with
                    
181   * one call:
                    
                
lodash.underscore.js https://gitlab.com/nVySin/Mo_Grabber | JavaScript | 1643 lines
                    
2 * Lo-Dash 0.10.0 (Custom Build) <http://lodash.com>
                    
3 * Build: `lodash underscore -d -o ./lodash.underscore.js`
                    
4 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
5 * Based on Underscore.js 1.4.2 <http://underscorejs.org>
                    
6 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
47  /**
                    
48   * Used to match ES6 template delimiters
                    
49   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
50   */
                    
51  var reEsTemplate = /\$\{((?:(?=\\?)\\?[\s\S])*?)}/g;
                    
52
                    
52
                    
53  /** Used to match "interpolate" template delimiters */
                    
54  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
                
README.markdown https://gitlab.com/nVySin/Mo_Grabber | Markdown | 668 lines
                    
11
                    
12As name states this an extension for [Underscore.js][u], but it can be used
                    
13independently from **_s**-global variable. But with Underscore.js you can
                    
40
                    
41**Integrate with Underscore.js**:
                    
42
                    
233
                    
234Supplant function was removed, use Underscore.js [template function][p].
                    
235
                    
235
                    
236[p]: http://documentcloud.github.com/underscore/#template
                    
237
                    
623
                    
624* Created integration test suite with underscore.js 1.1.4 (now it's absolutely compatible)
                    
625* Removed 'reverse' function, because this function override underscore.js 'reverse'
                    
                
lodash.underscore.js https://gitlab.com/nVySin/Mo_Grabber | JavaScript | 1629 lines
                    
3 * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * Based on Underscore.js 1.4.2 <http://underscorejs.org>
                    
5 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
46  /**
                    
47   * Used to match ES6 template delimiters
                    
48   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
49   */
                    
50  var reEsTemplate = /\$\{((?:(?=\\?)\\?[\s\S])*?)}/g;
                    
51
                    
51
                    
52  /** Used to match "interpolate" template delimiters */
                    
53  var reInterpolate = /<%=([\s\S]+?)%>/g;
                    
54
                    
55  /** Used to ensure capturing order of template delimiters */
                    
56  var reNoMatch = /($^)/;
                    
                
mis_details.html https://gitlab.com/g66shivam/gstudio | HTML | 758 lines
                    
14  <script type="text/javascript" src="/static/ndf/bower_components/d3/d3.min.js"></script> <!-- checked -->
                    
15  <script type="text/javascript" src="/static/ndf/bower_components/underscore/underscore.js"></script> <!-- checked -->
                    
16  <script sync="text/javascript" src="/static/ndf/bower_components/FileSaver/FileSaver.js" ></script> <!-- checked -->
                    
91{% block body_content %} 
                    
92  {# template for showing apt_set_instance details #}
                    
93
                    
93
                    
94  {% if app_set_instance_template %}
                    
95
                    
374            <a class="close-reveal-modal" >&#215;</a>
                    
375        	  {% include "ndf/map_widget.html" with mode="read" source="custom_template_edit" %}
                    
376
                    
                
html.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 1107 lines
                    
87    # This is a class attribute because it is mutated by Sphinx.add_javascript.
                    
88    script_files = ['_static/jquery.js', '_static/underscore.js',
                    
89                    '_static/doctools.js']
                    
107
                    
108        self.init_templates()
                    
109        self.init_highlighter()
                    
138
                    
139    def init_templates(self):
                    
140        Theme.init_themes(self.confdir, self.config.html_theme_path,
                    
144        self.theme_options = themeoptions.copy()
                    
145        self.create_template_bridge()
                    
146        self.templates.init(self, self.theme)
                    
202        if self.templates:
                    
203            template_mtime = self.templates.newest_template_mtime()
                    
204        else:
                    
                
index.html https://gitlab.com/jonnyforney/beerbowerpainting | HTML | 1397 lines
                    
5  <meta http-equiv="X-UA-Compatible" content="chrome=1">
                    
6  <title>Underscore.js</title>
                    
7  <style>
                    
72
                    
73    <h1>Underscore.js</h1>
                    
74
                    
120      <tr>
                    
121        <td><a href="underscore.js">Development Version (1.1.7)</a></td>
                    
122        <td><i>28kb, Uncompressed with Comments</i></td>
                    
185      <a href="#mixin">mixin</a>, <a href="#uniqueId">uniqueId</a>, 
                    
186      <a href="#template">template</a></span>
                    
187    </p>
                    
                
README.md https://gitlab.com/dima-antonenko/projectX | Markdown | 701 lines
                    
29- [Configuration](https://github.com/kylestetz/CLNDR#some-configuration)
                    
30  - [Template Rendering Engine](https://github.com/kylestetz/CLNDR#template-rendering-engine)
                    
31  - [Internationalization](https://github.com/kylestetz/CLNDR#internationalization)
                    
31  - [Internationalization](https://github.com/kylestetz/CLNDR#internationalization)
                    
32  - [Underscore Template Delimiters](https://github.com/kylestetz/CLNDR#underscore-template-delimiters)
                    
33  - [Internet Explorer Issues](https://github.com/kylestetz/CLNDR#internet-explorer-issues)
                    
48
                    
49[jQuery](http://jquery.com/download/) and [Moment.js](http://momentjs.com/) are depended upon. By default CLNDR tries to use [Underscore.js](http://underscorejs.org/)'s `_.template()` function, however if you specify a custom rendering function (see documentation below) underscore will not be used at all.
                    
50
                    
76
                    
77CLNDR doesn't generate markup (well, it has some reasonable defaults, but that's an aside). Instead, CLNDR asks you to create a template and in return it supplies your template with a great set of objects that will get you up and running in a few lines.
                    
78
                    
147  // or pulled in as a string
                    
148  template: clndrTemplate,
                    
149
                    
                
web.rst https://gitlab.com/thanhchatvn/cloud-odoo | ReStructuredText | 1457 lines
                    
21    * jQuery_
                    
22    * `Underscore.js`_
                    
23
                    
82``oepetstore/static/xml/petstore.xml``
                    
83    Mostly empty, will hold :ref:`reference/qweb` templates
                    
84``oepetstore/static/js/petstore.js``
                    
                
themes.rst https://gitlab.com/thanhchatvn/cloud-odoo | ReStructuredText | 968 lines
                    
158
                    
159Almost every element and option that you create has to be placed inside a ``<template>`` tag, like in this example.
                    
160
                    
166      <h2 class="lead">And this is a subtitle</h2>
                    
167    </template>
                    
168
                    
170
                    
171   don't misunderstand what ``template`` means. A template tag only
                    
172   defines a piece of html code or options - but it does not
                    
338    </xpath>
                    
339  </template>
                    
340
                    
375Inside your *views* folder, create a **pages.xml** file and add the
                    
376default Odoo markup.  Inside ``<data>`` create a ``<template>`` tag, set the
                    
377``page`` attribute to ``True`` and add your code into it.
                    
                
CHANGELOG.md https://gitlab.com/jeaster12/fabby | Markdown | 367 lines
                    
4### Description
                    
5* Beautifier does not break PHP and Underscore.js templates
                    
6* Fix for SCSS pseudo classes and intperpolation/mixins
                    
16* No new line after selector in scss files ([#666](https://github.com/beautify-web/js-beautify/issues/666))
                    
17* using html-beautify on handlebars template deletes unclosed tag if on second line ([#623](https://github.com/beautify-web/js-beautify/issues/623))
                    
18* more Extra space after scss pseudo classes ([#557](https://github.com/beautify-web/js-beautify/issues/557))
                    
19* Unnecessary spaces in PHP code ([#490](https://github.com/beautify-web/js-beautify/issues/490))
                    
20* Some underscore.js template tags are broken ([#417](https://github.com/beautify-web/js-beautify/issues/417))
                    
21* Selective ignore using comments (feature request) ([#384](https://github.com/beautify-web/js-beautify/issues/384))
                    
149* New line added between each css declaration ([#523](https://github.com/beautify-web/js-beautify/issues/523))
                    
150* Kendo Template scripts get messed up! ([#516](https://github.com/beautify-web/js-beautify/issues/516))
                    
151* SyntaxError: Unexpected token ++ ([#514](https://github.com/beautify-web/js-beautify/issues/514))
                    
191* Improved indenting for statements (#289)
                    
192* Improved ES6 support - let, const, template strings, and "fat arrow"
                    
193* Support for non-ASCII characters in variable names (#305)
                    
                
ng-lodash.js https://gitlab.com/github-cloud-corporation/Dexter | JavaScript | 1040 lines
                    
5 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
31        var arrayBufferTag = '[object ArrayBuffer]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]';
                    
32        /** Used to match empty string literals in compiled template source. */
                    
33        var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
                    
35        var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, reUnescapedHtml = /[&<>"'`]/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
                    
36        /** Used to match template delimiters. */
                    
37        var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
                    
49        var reEscapeChar = /\\(\\)?/g;
                    
50        /** Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components). */
                    
51        var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
59        var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
                    
60        /** Used to ensure capturing order of template delimiters. */
                    
61        var reNoMatch = /($^)/;
                    
                
lodash.src.js https://gitlab.com/github-cloud-corporation/Dexter | JavaScript | 1293 lines
                    
4 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
6 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
72
                    
73    /** Used to match empty string literals in compiled template source. */
                    
74    var reEmptyStringLeading = /\b__p \+= '';/g,
                    
83
                    
84    /** Used to match template delimiters. */
                    
85    var reEscape = /<%-([\s\S]+?)%>/g,
                    
107
                    
108    /** Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components). */
                    
109    var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
122
                    
123    /** Used to ensure capturing order of template delimiters. */
                    
124    var reNoMatch = /($^)/;
                    
                
lodash.js https://gitlab.com/varunsonavne/node-hello | JavaScript | 1528 lines
                    
5 * Released under MIT license <https://lodash.com/license>
                    
6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
7 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
22      FUNC_ERROR_TEXT = 'Expected a function',
                    
23      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
                    
24
                    
127
                    
128  /** Used to match empty string literals in compiled template source. */
                    
129  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
138
                    
139  /** Used to match template delimiters. */
                    
140  var reEscape = /<%-([\s\S]+?)%>/g,
                    
186   * Used to match
                    
187   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
                    
188   */
                    
                
bundles.py https://gitlab.com/jslee1/kitsune | Python | 634 lines
                    
272            'sumo/js/i18n.js',
                    
273            'underscore/underscore.js',
                    
274            'moment/moment.js',
                    
278            'sumo/js/libs/jquery.placeholder.js',
                    
279            'sumo/js/templates/macros.js',
                    
280            'sumo/js/templates/search-results-list.js',
                    
280            'sumo/js/templates/search-results-list.js',
                    
281            'sumo/js/templates/search-results.js',
                    
282            'nunjucks/browser/nunjucks-slim.js',
                    
347            'sumo/js/dnt-helper.js',
                    
348            'sumo/js/templates/mobile-search-results.js',
                    
349            'moment/moment.js',
                    
350            'sumo/js/i18n.js',
                    
351            'underscore/underscore.js',
                    
352            'jquery/jquery.min.js',
                    
                
packages.py https://gitlab.com/gregtyka/KhanLatest | Python | 659 lines
                    
32            "jquery.cookie.js",
                    
33            "underscore.js",
                    
34            "underscore-extras.js",
                    
37            register_conditional_file("handlebars.js", "handlebars.vm.js"),
                    
38            "templates.js",
                    
39            "bootstrap-alerts.js",
                    
47
                    
48            # application code & templates:
                    
49            "small-exercise-icon.handlebars",
                    
319            "card-leaves.handlebars",
                    
320            "problem-template.handlebars",
                    
321            "end-of-stack-card.handlebars",
                    
339            "local-only/localeplanet/icu.en-US.js",
                    
340            "local-only/underscore.js",
                    
341            "interface.js",
                    
                
index.d.ts https://gitlab.com/no15/komnit | TypeScript Typings | 1850 lines
                    
4	/**
                    
5	* underscore.js _.throttle options.
                    
6	**/
                    
20	/**
                    
21	* underscore.js template settings, set templateSettings or pass as an argument
                    
22	* to 'template()' to override defaults.
                    
23	**/
                    
24	interface TemplateSettings {
                    
25		/**
                    
40		/**
                    
41		* By default, 'template()' places the values from your data in the local scope via the 'with' statement.
                    
42		* However, you can specify a single variable name with this setting.
                    
                
jquery.mentionsInput.js https://gitlab.com/vectorci/samson | JavaScript | 546 lines
                    
12 *
                    
13 * Using underscore.js
                    
14 *
                    
35    },
                    
36    templates     : {
                    
37      wrapper                    : _.template('<div class="mentions-input-box"></div>'),
                    
37      wrapper                    : _.template('<div class="mentions-input-box"></div>'),
                    
38      autocompleteList           : _.template('<div class="mentions-autocomplete-list"></div>'),
                    
39      autocompleteListItem       : _.template('<li data-ref-id="<%= id %>" data-ref-type="<%= type %>" data-display="<%= display %>"><%= content %></li>'),
                    
39      autocompleteListItem       : _.template('<li data-ref-id="<%= id %>" data-ref-type="<%= type %>" data-display="<%= display %>"><%= content %></li>'),
                    
40      autocompleteListItemAvatar : _.template('<img src="<%= avatar %>" />'),
                    
41      autocompleteListItemIcon   : _.template('<div class="icon <%= icon %>"></div>'),
                    
41      autocompleteListItemIcon   : _.template('<div class="icon <%= icon %>"></div>'),
                    
42      mentionsOverlay            : _.template('<div class="mentions"><div></div></div>'),
                    
43      mentionItemSyntax          : _.template('@[<%= value %>](<%= type %>:<%= id %>)'),
                    
                
index.html https://bitbucket.org/qbit_/nbdjs.git | HTML | 1395 lines
                    
5  <meta http-equiv="X-UA-Compatible" content="chrome=1">
                    
6  <title>Underscore.js</title>
                    
7  <style>
                    
72
                    
73    <h1>Underscore.js</h1>
                    
74
                    
120      <tr>
                    
121        <td><a href="underscore.js">Development Version (1.1.6)</a></td>
                    
122        <td><i>27kb, Uncompressed with Comments</i></td>
                    
184      <a href="#mixin">mixin</a>, <a href="#uniqueId">uniqueId</a>, 
                    
185      <a href="#template">template</a></span>
                    
186    </p>
                    
                
knockback.js https://bitbucket.org/mbinot/backboned.git | JavaScript | 1561 lines
                    
4  License: MIT (http://www.opensource.org/licenses/mit-license.php)
                    
5  Dependencies: Knockout.js, Backbone.js, and Underscore.js.
                    
6*/
                    
108
                    
109  kb.renderTemplate = function(template, view_model, options) {
                    
110    var el, observable;
                    
114    el = document.createElement('div');
                    
115    observable = ko.renderTemplate(template, view_model, options, el, 'replaceChildren');
                    
116    if (el.children.length === 1) {
                    
123
                    
124  kb.renderAutoReleasedTemplate = function(template, view_model, options) {
                    
125    if (options == null) {
                    
127    }
                    
128    legacyWarning('kb.renderAutoReleasedTemplate', '0.16.3', 'Please use kb.renderTemplate instead');
                    
129    return this.renderTemplate(template, view_model, options = {});
                    
                
lodash.js https://gitlab.com/yutiansut/Strut | JavaScript | 1541 lines
                    
3 * Copyright 2012 John-David Dalton <http://allyoucanleet.com/>
                    
4 * Based on Underscore.js 1.3.3, copyright 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
                    
5 * <http://documentcloud.github.com/underscore>
                    
71
                    
72  /** Used to make template sourceURLs easier to identify */
                    
73  var templateCounter = 0;
                    
288   * By default, the template delimiters used by Lo-Dash are similar to those in
                    
289   * embedded Ruby (ERB). Change the following template settings to use alternative
                    
290   * delimiters.
                    
301     * @static
                    
302     * @memberOf _.templateSettings
                    
303     * @type RegExp
                    
343   */
                    
344  var iteratorTemplate = template(
                    
345    // conditional strict mode
                    
                
global.web.properties https://gitlab.com/jsr38/intermine | Properties File | 436 lines
                    
77head.js.all.Ab = CDN/js/jquery/2.0.3/jquery.min.js
                    
78head.js.all.Ac = CDN/js/underscore.js/1.7.0/underscore.js
                    
79head.js.all.Ad = CDN/js/backbone.js/1.1.2/backbone.js
                    
159help.page.begin=begin
                    
160help.page.templates=templates
                    
161help.page.bag=lists
                    
167help.page.mymine.saved=mymine:savedQueries
                    
168help.page.mymine.templates=mymine:savedTemplates
                    
169help.page.mymine.password=mymine:changePassword
                    
171help.page.report=reportPage
                    
172help.page.template=template
                    
173help.page.results=results
                    
182#hint.templates.1=If you create a MyMine account and log in you can create your own Template Queries.
                    
183#hint.template.1=You can run template queries on whole lists of data. Lists of the correct type will \
                    
184#appear automatically, click the checkbox to use a list.
                    
                
lodash.js https://gitlab.com/AceXintense/Gulp-Site-Template | JavaScript | 1509 lines
                    
6 * Released under MIT license <https://lodash.com/license>
                    
7 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
8 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
100
                    
101  /** Used to match empty string literals in compiled template source. */
                    
102  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
111
                    
112  /** Used to match template delimiters. */
                    
113  var reEscape = /<%-([\s\S]+?)%>/g,
                    
133
                    
134  /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
                    
135  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
160
                    
161  /** Used to ensure capturing order of template delimiters. */
                    
162  var reNoMatch = /($^)/;
                    
                
index.html https://bitbucket.org/peromax/good.git | HTML | 1419 lines
                    
5  <meta http-equiv="X-UA-Compatible" content="chrome=1">
                    
6  <title>Underscore.js</title>
                    
7  <style>
                    
80
                    
81    <h1>Underscore.js</h1>
                    
82
                    
128      <tr>
                    
129        <td><a href="underscore.js">Development Version (1.2.1)</a></td>
                    
130        <td><i>33kb, Uncompressed with Comments</i></td>
                    
194      <a href="#mixin">mixin</a>, <a href="#uniqueId">uniqueId</a>, 
                    
195      <a href="#template">template</a></span>
                    
196    </p>
                    
                
template-micro-coverage.js https://gitlab.com/fxaeberhard/Wedance-java | JavaScript | 294 lines
                    
24}
                    
25_yuitest_coverage["build/template-micro/template-micro.js"] = {
                    
26    lines: {},
                    
34};
                    
35_yuitest_coverage["build/template-micro/template-micro.js"].code=["YUI.add('template-micro', function (Y, NAME) {","","/**","Adds the `Y.Template.Micro` template engine, which provides fast, simple","string-based micro-templating similar to ERB or Underscore templates.","","@module template","@submodule template-micro","@since 3.8.0","**/","","/**","Fast, simple string-based micro-templating engine similar to ERB or Underscore","templates.","","@class Template.Micro","@static","@since 3.8.0","**/","","// This code was heavily inspired by Underscore.js's _.template() method","// (written by Jeremy Ashkenas), which was in turn inspired by John Resig's","// micro-templating implementation.","","var Micro = Y.namespace('Template.Micro');","","/**","Default options for `Y.Template.Micro`.","","@property {Object} options","","    @param {RegExp} [options.code] Regex that matches code blocks like","        `<% ... %>`.","    @param {RegExp} [options.escapedOutput] Regex that matches escaped output","        tags like `<%= ... %>`.","    @param {RegExp} [options.rawOutput] Regex that matches raw output tags like","        `<%== ... %>`.","    @param {RegExp} [options.stringEscape] Regex that matches characters that","        need to be escaped inside single-quoted JavaScript string literals.","","@static","@since 3.8.0","**/","Micro.options = {","    code         : /<%([\\s\\S]+?)%>/g,","    escapedOutput: /<%=([\\s\\S]+?)%>/g,","    rawOutput    : /<%==([\\s\\S]+?)%>/g,","    stringEscape : /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g","};","","/**","Compiles a template string into a JavaScript function. Pass a data object to the","function to render the template using the given data and get back a rendered","string.","","Within a template, use `<%= ... %>` to output the value of an expression (where","`...` is the JavaScript expression or data variable to evaluate). The output","will be HTML-escaped by default. To output a raw value without escaping, use","`<%== ... %>`, but be careful not to do this with untrusted user input.","","To execute arbitrary JavaScript code within the template without rendering its","output, use `<% ... %>`, where `...` is the code to be executed. This allows the","use of if/else blocks, loops, function calls, etc., although it's recommended","that you avoid embedding anything beyond basic flow control logic in your","templates.","","Properties of the data object passed to a template function are made available","on a `data` variable within the scope of the template. So, if you pass in","the object `{message: 'hello!'}`, you can print the value of the `message`","property using `<%= data.message %>`.","","@example","","    YUI().use('template-micro', function (Y) {","        var template = '<ul class=\"<%= data.classNames.list %>\">' +","                           '<% Y.Array.each(data.items, function (item) { %>' +","                               '<li><%= item %></li>' +","                           '<% }); %>' +","                       '</ul>';","","        // Compile the template into a function.","        var compiled = Y.Template.Micro.compile(template);","","        // Render the template to HTML, passing in the data to use.","        var html = compiled({","            classNames: {list: 'demo'},","            items     : ['one', 'two', 'three', 'four']","        });","    });","","@method compile","@param {String} text Template text to compile.","@param {Object} [options] Options. If specified, these options will override the","    default options defined in `Y.Template.Micro.options`. See the documentation","    for that property for details on which options are available.","@return {Function} Compiled template function. Execute this function and pass in","    a data object to render the template with the given data.","@static","@since 3.8.0","**/","Micro.compile = function (text, options) {","    var blocks     = [],","        tokenClose = \"\\uffff\",","        tokenOpen  = \"\\ufffe\",","        source;","","    options = Y.merge(Micro.options, options);","","    // Parse the input text into a string of JavaScript code, with placeholders","    // for code blocks. Text outside of code blocks will be escaped for safe","    // usage within a double-quoted string literal.","    source = \"var $b='',$t='\" +","","        // U+FFFE and U+FFFF are guaranteed to represent non-characters, so no","        // valid UTF-8 string should ever contain them. That means we can freely","        // strip them out of the input text (just to be safe) and then use them","        // for our own nefarious purposes as token placeholders!","        //","        // See http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Noncharacters","        text.replace(/\\ufffe|\\uffff/g, '')","","        .replace(options.rawOutput, function (match, code) {","            return tokenOpen + (blocks.push(\"'+\\n((\" + code + \")||$b)+\\n'\") - 1) + tokenClose;","        })","","        .replace(options.escapedOutput, function (match, code) {","            return tokenOpen + (blocks.push(\"'+\\n$e((\" + code + \")||$b)+\\n'\") - 1) + tokenClose;","        })","","        .replace(options.code, function (match, code) {","            return tokenOpen + (blocks.push(\"';\\n\" + code + \"\\n$t+='\") - 1) + tokenClose;","        })","","        .replace(options.stringEscape, \"\\\\$&\")","","        // Replace the token placeholders with code.","        .replace(/\\ufffe(\\d+)\\uffff/g, function (match, index) {","            return blocks[parseInt(index, 10)];","        })","","        // Remove noop string concatenations that have been left behind.","        .replace(/\\n\\$t\\+='';\\n/g, '\\n') +","","        \"';\\nreturn $t;\";","","    // If compile() was called from precompile(), return precompiled source.","    if (options.precompile) {","        return \"function (Y, $e, data) {\\n\" + source + \"\\n}\";","    }","","    // Otherwise, return an executable function.","    return this.revive(new Function('Y', '$e', 'data', source));","};","","/**","Precompiles the given template text into a string of JavaScript source code that","can be evaluated later in another context (or on another machine) to render the","template.","","A common use case is to precompile templates at build time or on the server,","then evaluate the code on the client to render a template. The client only needs","to revive and render the template, avoiding the work of the compilation step.","","@method precompile","@param {String} text Template text to precompile.","@param {Object} [options] Options. If specified, these options will override the","    default options defined in `Y.Template.Micro.options`. See the documentation","    for that property for details on which options are available.","@return {String} Source code for the precompiled template.","@static","@since 3.8.0","**/","Micro.precompile = function (text, options) {","    options || (options = {});","    options.precompile = true;","","    return this.compile(text, options);","};","","/**","Compiles and renders the given template text in a single step.","","This can be useful for single-use templates, but if you plan to render the same","template multiple times, it's much better to use `compile()` to compile it once,","then simply call the compiled function multiple times to avoid recompiling.","","@method render","@param {String} text Template text to render.","@param {Object} data Data to pass to the template.","@param {Object} [options] Options. If specified, these options will override the","    default options defined in `Y.Template.Micro.options`. See the documentation","    for that property for details on which options are available.","@return {String} Rendered result.","@static","@since 3.8.0","**/","Micro.render = function (text, data, options) {","    return this.compile(text, options)(data);","};","","/**","Revives a precompiled template function into a normal compiled template function","that can be called to render the template. The precompiled function must already","have been evaluated to a function -- you can't pass raw JavaScript code to","`revive()`.","","@method revive","@param {Function} precompiled Precompiled template function.","@return {Function} Revived template function, ready to be rendered.","@static","@since 3.8.0","**/","Micro.revive = function (precompiled) {","    return function (data) {","        data || (data = {});","        return precompiled.call(data, Y, Y.Escape.html, data);","    };","};","","","}, '3.8.0', {\"requires\": [\"escape\"]});"];
                    
36_yuitest_coverage["build/template-micro/template-micro.js"].lines = {"1":0,"25":0,"44":0,"101":0,"102":0,"107":0,"112":0,"123":0,"127":0,"131":0,"138":0,"147":0,"148":0,"152":0,"173":0,"174":0,"175":0,"177":0,"197":0,"198":0,"213":0,"214":0,"215":0,"216":0};
                    
37_yuitest_coverage["build/template-micro/template-micro.js"].functions = {"(anonymous 2):122":0,"(anonymous 3):126":0,"(anonymous 4):130":0,"(anonymous 5):137":0,"compile:101":0,"precompile:173":0,"render:197":0,"(anonymous 6):214":0,"revive:213":0,"(anonymous 1):1":0};
                    
38_yuitest_coverage["build/template-micro/template-micro.js"].coveredLines = 24;
                    
39_yuitest_coverage["build/template-micro/template-micro.js"].coveredFunctions = 10;
                    
152
                    
153    _yuitest_coverline("build/template-micro/template-micro.js", 107);
                    
154options = Y.merge(Micro.options, options);
                    
158    // usage within a double-quoted string literal.
                    
159    _yuitest_coverline("build/template-micro/template-micro.js", 112);
                    
160source = "var $b='',$t='" +
                    
                
lodash.js https://gitlab.com/geo85/Hotspot | JavaScript | 1432 lines
                    
5 * Released under MIT license <https://lodash.com/license>
                    
6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
7 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
126
                    
127    /** Used to match empty string literals in compiled template source. */
                    
128    var reEmptyStringLeading = /\b__p \+= '';/g,
                    
137
                    
138    /** Used to match template delimiters. */
                    
139    var reEscape = /<%-([\s\S]+?)%>/g,
                    
173     * Used to match
                    
174     * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
                    
175     */
                    
175     */
                    
176    var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
177
                    
                
index.js https://gitlab.com/nhanvu/cyber-duck | JavaScript | 389 lines
                    
15    restParam = require('lodash.restparam'),
                    
16    templateSettings = require('lodash.templatesettings');
                    
17
                    
25
                    
26/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
                    
27var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
205 * // using the "evaluate" delimiter to execute JavaScript and generate HTML
                    
206 * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
                    
207 * compiled({ 'users': ['fred', 'barney'] });
                    
261  // and Laura Doktorova's doT.js (https://github.com/olado/doT).
                    
262  var settings = templateSettings.imports._.templateSettings || templateSettings;
                    
263
                    
352  // Provide the compiled function's source by its `toString` method or
                    
353  // the `source` property as a convenience for inlining compiled templates.
                    
354  result.source = source;
                    
                
replacekey.html https://gitlab.com/montanari/replacekey | HTML | 391 lines
                    
23    <script type="text/javascript" src="../_static/jquery.js"></script>
                    
24    <script type="text/javascript" src="../_static/underscore.js"></script>
                    
25    <script type="text/javascript" src="../_static/doctools.js"></script>
                    
42  <h1>Source code for replacekey</h1><div class="highlight"><pre>
                    
43<span></span><span class="sd">&quot;&quot;&quot;Replace key expressions by templates.</span>
                    
44
                    
74<span class="sd">    in the form `{{key_label}}`.  Replace these keys by the content</span>
                    
75<span class="sd">    set in respective files under a `keys/` directory.  Templates</span>
                    
76<span class="sd">    under this directory must be in the form `key_label.extension`.</span>
                    
                
template.js https://gitlab.com/blocknotary/IonicInterviews | JavaScript | 216 lines
                    
13    reInterpolate = require('../internals/reInterpolate'),
                    
14    templateSettings = require('./templateSettings'),
                    
15    values = require('../objects/values');
                    
25 */
                    
26var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
27
                    
54 * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
                    
55 * @param {Object} [options.imports] An object to import into the template as local variables.
                    
56 * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
                    
81 * // using the internal `print` function in "evaluate" delimiters
                    
82 * _.template('<% print("hello " + name); %>!', { 'name': 'barney' });
                    
83 * // => 'hello barney!'
                    
124  // https://github.com/olado/doT
                    
125  var settings = templateSettings.imports._.templateSettings || templateSettings;
                    
126  text = String(text || '');
                    
                
accounting.js https://gitlab.com/kammala/balancer | JavaScript | 266 lines
                    
25                    });
                    
26                // should I use underscore.js?
                    
27                angular.forEach(filtered, function(v) {
                    
36    $scope.cancel_invite = function(user) {
                    
37        // should I use underscore.js?
                    
38        $scope.invited_users = $filter('filter')($scope.invited_users, function(v) {return v.id !== user.id});
                    
260        $modal.open({
                    
261            templateUrl: 'invite_modal',
                    
262            controller: invite_modal_ctrl,
                    
                
themes.rst https://gitlab.com/padjis/mapan | ReStructuredText | 1041 lines
                    
92     * jQuery UI
                    
93     * underscore.js
                    
94
                    
162
                    
163Almost every element and option that you create has to be placed inside a ``<template>`` tag, like in this example.
                    
164
                    
167    [XML]
                    
168    <template id="my_title" name="My title">
                    
169      <h1>This is an HTML block</h1>
                    
170      <h2 class="lead">And this is a subtitle</h2>
                    
171    </template>
                    
172
                    
174
                    
175   don't misunderstand what ``template`` means. A template tag only
                    
176   defines a piece of html code or options - but it does not
                    
                
lodash.js https://gitlab.com/kamalk333/todo | JavaScript | 331 lines
                    
6 * Released under MIT license <https://lodash.com/license>
                    
7 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
                    
8 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
266export { default as tap } from './tap.js';
                    
267export { default as template } from './template.js';
                    
268export { default as templateSettings } from './templateSettings.js';
                    
                
lodash.js https://gitlab.com/Ruwan-Ranganath/discourse | JavaScript | 1472 lines
                    
3 * Lo-Dash 1.3.0 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash minus="template" -d`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
                    
33
                    
34  /** Used to match empty string literals in compiled template source */
                    
35  var reEmptyStringLeading = /\b__p \+= '';/g,
                    
42  /**
                    
43   * Used to match ES6 template delimiters
                    
44   * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
                    
45   */
                    
46  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
                    
47
                    
                
uri.html https://github.com/cpp-netlib/cpp-netlib.github.com.git | HTML | 284 lines
                    
9    
                    
10    <title>The URI template &mdash; cpp-netlib v0.8 documentation</title>
                    
11    <link rel="stylesheet" href="_static/cpp-netlib.css" type="text/css" />
                    
27    <link rel="next" title="HTTP implementation" href="http.html" />
                    
28    <link rel="prev" title="The message template" href="message.html" /> 
                    
29  </head>
                    
36      <div class="nav">
                    
37    &laquo; <a href="message.html" title="The message template">previous</a>
                    
38     |
                    
49  <div class="section" id="the-uri-template">
                    
50<h1>The URI template<a class="headerlink" href="#the-uri-template" title="Permalink to this headline">¶</a></h1>
                    
51<p>In addition to protocol implementations, the <tt class="xref py py-mod docutils literal"><span class="pre">cpp-netlib</span></tt>
                    
51<p>In addition to protocol implementations, the <tt class="xref py py-mod docutils literal"><span class="pre">cpp-netlib</span></tt>
                    
52provides a powerful URI template.  The URI template implements a
                    
53parser based on <a class="reference external" href="http://tools.ietf.org/html/rfc3986">RFC 3986</a>.</p>
                    
                
class-epsilon-section-recommended-actions.php https://gitlab.com/chernushov881/charity-fund | PHP | 542 lines
                    
121			if ( empty( $this->theme_slug ) ) {
                    
122				$json['theme_slug'] = get_template();
                    
123			}
                    
129	/**
                    
130	 * Outputs the Underscore.js template.
                    
131	 *
                    
135	 */
                    
136	protected function render_template() {
                    
137		//@formatter:off
                    
                
siteorigin-panels.js https://gitlab.com/haque.mdmanzurul/wp-harpar-carolyn | JavaScript | 1524 lines
                    
8/**
                    
9 * Convert template into something compatible with Underscore.js templates
                    
10 *
                    
13 */
                    
14String.prototype.panelsProcessTemplate = function(){
                    
15    var s = this;
                    
191    panels.view.widget = Backbone.View.extend({
                    
192        template: _.template( $('#siteorigin-panels-builder-widget').html().panelsProcessTemplate() ),
                    
193
                    
431    panels.view.cell = Backbone.View.extend( {
                    
432        template: _.template( $('#siteorigin-panels-builder-cell').html().panelsProcessTemplate() ),
                    
433        events : {
                    
454
                    
455            this.setElement( this.template(templateArgs) );
                    
456            this.$el.data('view', this);
                    
                
index.js https://gitlab.com/jacobberglund/monomono | JavaScript | 389 lines
                    
15    keys = require('lodash.keys'),
                    
16    templateSettings = require('lodash.templatesettings');
                    
17
                    
20
                    
21/** Used to match empty string literals in compiled template source. */
                    
22var reEmptyStringLeading = /\b__p \+= '';/g,
                    
27 * Used to match ES template delimiters.
                    
28 * See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components)
                    
29 * for more details.
                    
193 * // using the HTML "escape" delimiter to escape data property values
                    
194 * var compiled = _.template('<b><%- value %></b>');
                    
195 * compiled({ 'value': '<script>' });
                    
254  // and Laura Doktorova's doT.js (https://github.com/olado/doT).
                    
255  var settings = templateSettings.imports._.templateSettings || templateSettings;
                    
256
                    
                
lex.js https://gitlab.com/xxtxx/atom-settings | JavaScript | 1651 lines
                    
31  RegExp: 9,
                    
32  TemplateLiteral: 10
                    
33};
                    
149   * Subscribe to a token event. The API for this method is similar
                    
150   * Underscore.js i.e. you can subscribe to multiple events with
                    
151   * one call:
                    
                
lodash.js https://gitlab.com/xxtxx/atom-settings | JavaScript | 1508 lines
                    
3 * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
                    
4 * Build: `lodash modern minus="template"`
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
5 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
                    
6 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
                    
7 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                    
                
index.html https://gitlab.com/atonb117/board | HTML | 300 lines
                    
37  var api_url = '/api/v1/';
                    
38  var template_url = '/client/';
                    
39  </script>
                    
44  <script src="js/libs/jquery.drawDoughnutChart.js"></script>
                    
45  <script src="js/libs/underscore.js"></script>
                    
46  <script src="js/libs/backbone.js"></script>
                    
106  <script src="js/models/elasticsearch.js"></script>
                    
107  <script src="js/models/workflow_template.js"></script>
                    
108  <script src="js/models/acl.js"></script>
                    
113  <script src="js/models/instant_card_add.js"></script>
                    
114  <script src="js/models/email_template.js"></script>
                    
115  <script src="js/collections/user_collection.js"></script>
                    
142  <script src="js/collections/role_settings_collection.js"></script>
                    
143  <script src="js/templates/templates.js"></script>
                    
144  <script src="js/views/application_view.js"></script>
                    
                
 

Source

Language