Match Helpers
match
Visit the: code | unit tests
{match}
Returns an array of strings that match the given glob pattern(s). Options may be passed on the options hash or locals.
Params
files
Array|Stringpatterns
Array|String: One or more glob patterns.locals
Objectoptions
Objectreturns
Array: Array of matches
Example
{{match (readdir "foo") "*.js"}}
{{match (readdir "foo") (toRegex "\\.js$")}}
{isMatch}
Returns true if a filepath contains the given pattern. Options may be passed on the options hash or locals.
Params
filepath
Stringpattern
Stringoptions
Objectreturns
Boolean
Example
{{isMatch "foo.md" "*.md"}}