We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9e8139 commit e5448f0Copy full SHA for e5448f0
builder/pattern_engines/engine_mustache.js
@@ -47,12 +47,15 @@
47
return Mustache.render(template, data);
48
},
49
50
- // find partials based on regex.
51
- // @param {string|object} pattern - either a string or a pattern object.
52
- // @param {object} regex - a JavaScript RegExp object.
53
- // @returns {array}
+ /**
+ * Find partials based on regex.
+ *
+ * @param {string|object} pattern Either a string or a pattern object.
54
+ * @param {object} regex A JavaScript RegExp object.
55
+ * @returns {array|null} An array if a match is found, null if not.
56
+ */
57
partialsFinder: function partialsFinder(pattern, regex){
- var matches = [];
58
+ var matches;
59
60
if(typeof pattern === 'string'){
61
matches = pattern.match(regex);
0 commit comments