main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[d565449] | 1 | import escape from './escape.js';
|
---|
| 2 | import reEscape from './_reEscape.js';
|
---|
| 3 | import reEvaluate from './_reEvaluate.js';
|
---|
| 4 | import reInterpolate from './_reInterpolate.js';
|
---|
| 5 |
|
---|
| 6 | /**
|
---|
| 7 | * By default, the template delimiters used by lodash are like those in
|
---|
| 8 | * embedded Ruby (ERB) as well as ES2015 template strings. Change the
|
---|
| 9 | * following template settings to use alternative delimiters.
|
---|
| 10 | *
|
---|
| 11 | * @static
|
---|
| 12 | * @memberOf _
|
---|
| 13 | * @type {Object}
|
---|
| 14 | */
|
---|
| 15 | var templateSettings = {
|
---|
| 16 |
|
---|
| 17 | /**
|
---|
| 18 | * Used to detect `data` property values to be HTML-escaped.
|
---|
| 19 | *
|
---|
| 20 | * @memberOf _.templateSettings
|
---|
| 21 | * @type {RegExp}
|
---|
| 22 | */
|
---|
| 23 | 'escape': reEscape,
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * Used to detect code to be evaluated.
|
---|
| 27 | *
|
---|
| 28 | * @memberOf _.templateSettings
|
---|
| 29 | * @type {RegExp}
|
---|
| 30 | */
|
---|
| 31 | 'evaluate': reEvaluate,
|
---|
| 32 |
|
---|
| 33 | /**
|
---|
| 34 | * Used to detect `data` property values to inject.
|
---|
| 35 | *
|
---|
| 36 | * @memberOf _.templateSettings
|
---|
| 37 | * @type {RegExp}
|
---|
| 38 | */
|
---|
| 39 | 'interpolate': reInterpolate,
|
---|
| 40 |
|
---|
| 41 | /**
|
---|
| 42 | * Used to reference the data object in the template text.
|
---|
| 43 | *
|
---|
| 44 | * @memberOf _.templateSettings
|
---|
| 45 | * @type {string}
|
---|
| 46 | */
|
---|
| 47 | 'variable': '',
|
---|
| 48 |
|
---|
| 49 | /**
|
---|
| 50 | * Used to import variables into the compiled template.
|
---|
| 51 | *
|
---|
| 52 | * @memberOf _.templateSettings
|
---|
| 53 | * @type {Object}
|
---|
| 54 | */
|
---|
| 55 | 'imports': {
|
---|
| 56 |
|
---|
| 57 | /**
|
---|
| 58 | * A reference to the `lodash` function.
|
---|
| 59 | *
|
---|
| 60 | * @memberOf _.templateSettings.imports
|
---|
| 61 | * @type {Function}
|
---|
| 62 | */
|
---|
| 63 | '_': { 'escape': escape }
|
---|
| 64 | }
|
---|
| 65 | };
|
---|
| 66 |
|
---|
| 67 | export default templateSettings;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.