Initial commit
[yaffs-website] / node_modules / lodash.templatesettings / index.js
1 /**
2  * lodash 3.1.1 (Custom Build) <https://lodash.com/>
3  * Build: `lodash modularize exports="npm" -o ./`
4  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
5  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
6  * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
7  * Available under MIT license <https://lodash.com/license>
8  */
9 var escape = require('lodash.escape'),
10     reInterpolate = require('lodash._reinterpolate');
11
12 /** Used to match template delimiters. */
13 var reEscape = /<%-([\s\S]+?)%>/g,
14     reEvaluate = /<%([\s\S]+?)%>/g;
15
16 /**
17  * By default, the template delimiters used by lodash are like those in
18  * embedded Ruby (ERB). Change the following template settings to use
19  * alternative delimiters.
20  *
21  * @static
22  * @memberOf _
23  * @type Object
24  */
25 var templateSettings = {
26
27   /**
28    * Used to detect `data` property values to be HTML-escaped.
29    *
30    * @memberOf _.templateSettings
31    * @type RegExp
32    */
33   'escape': reEscape,
34
35   /**
36    * Used to detect code to be evaluated.
37    *
38    * @memberOf _.templateSettings
39    * @type RegExp
40    */
41   'evaluate': reEvaluate,
42
43   /**
44    * Used to detect `data` property values to inject.
45    *
46    * @memberOf _.templateSettings
47    * @type RegExp
48    */
49   'interpolate': reInterpolate,
50
51   /**
52    * Used to reference the data object in the template text.
53    *
54    * @memberOf _.templateSettings
55    * @type string
56    */
57   'variable': '',
58
59   /**
60    * Used to import variables into the compiled template.
61    *
62    * @memberOf _.templateSettings
63    * @type Object
64    */
65   'imports': {
66
67     /**
68      * A reference to the `lodash` function.
69      *
70      * @memberOf _.templateSettings.imports
71      * @type Function
72      */
73     '_': { 'escape': escape }
74   }
75 };
76
77 module.exports = templateSettings;