Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit ebba8de

Browse files
author
e2tha-e
committed
updating function name and description
1 parent e5448f0 commit ebba8de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

builder/pattern_engines/engine_mustache.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
},
4949

5050
/**
51-
* Find partials based on regex.
51+
* Find regex matches within both pattern strings and pattern objects.
5252
*
5353
* @param {string|object} pattern Either a string or a pattern object.
5454
* @param {object} regex A JavaScript RegExp object.
5555
* @returns {array|null} An array if a match is found, null if not.
5656
*/
57-
partialsFinder: function partialsFinder(pattern, regex){
57+
patternMatcher: function patternMatcher(pattern, regex){
5858
var matches;
5959

6060
if(typeof pattern === 'string'){
@@ -67,21 +67,21 @@
6767
},
6868
// find and return any {{> template-name }} within pattern
6969
findPartials: function findPartials(pattern) {
70-
var matches = this.partialsFinder(pattern, this.findPartialsRE);
70+
var matches = this.patternMatcher(pattern, this.findPartialsRE);
7171
return matches;
7272
},
7373
findPartialsWithStyleModifiers: function(pattern) {
74-
var matches = this.partialsFinder(pattern, this.findPartialsWithStyleModifiersRE);
74+
var matches = this.patternMatcher(pattern, this.findPartialsWithStyleModifiersRE);
7575
return matches;
7676
},
7777
// returns any patterns that match {{> value(foo:"bar") }} or {{>
7878
// value:mod(foo:"bar") }} within the pattern
7979
findPartialsWithPatternParameters: function(pattern) {
80-
var matches = this.partialsFinder(pattern, this.findPartialsWithPatternParametersRE);
80+
var matches = this.patternMatcher(pattern, this.findPartialsWithPatternParametersRE);
8181
return matches;
8282
},
8383
findListItems: function(pattern) {
84-
var matches = this.partialsFinder(pattern, this.findListItemsRE);
84+
var matches = this.patternMatcher(pattern, this.findListItemsRE);
8585
return matches;
8686
},
8787
// given a pattern, and a partial string, tease out the "pattern key" and

0 commit comments

Comments
 (0)