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

Commit e5448f0

Browse files
author
e2tha-e
committed
a more accurate docblock
1 parent b9e8139 commit e5448f0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

builder/pattern_engines/engine_mustache.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,15 @@
4747
return Mustache.render(template, data);
4848
},
4949

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}
50+
/**
51+
* Find partials based on regex.
52+
*
53+
* @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+
*/
5457
partialsFinder: function partialsFinder(pattern, regex){
55-
var matches = [];
58+
var matches;
5659

5760
if(typeof pattern === 'string'){
5861
matches = pattern.match(regex);

0 commit comments

Comments
 (0)