On this page




createFilename(module, options, __namedParameters): string
Attributes
options:<object>
__namedParameters:<object>
Returns:<string>





matchObject(obj, str): void

matchPart(str, test): boolean
Attributes
string to test
test:
{Matcher} value which will be used to match against the string
Returns:<boolean>
true, when the RegExp matches

Tests if a string matches a RegExp or an array of RegExp.

ModuleFilenameHelpers.matchPart("foo.js", "foo"); // true
ModuleFilenameHelpers.matchPart("foo.js", "foo.js"); // true
ModuleFilenameHelpers.matchPart("foo.js", "foo."); // false
ModuleFilenameHelpers.matchPart("foo.js", "foo*"); // false
ModuleFilenameHelpers.matchPart("foo.js", "foo.*"); // true
ModuleFilenameHelpers.matchPart("foo.js", /^foo/); // true
ModuleFilenameHelpers.matchPart("foo.js", [/^foo/, "bar"]); // true
ModuleFilenameHelpers.matchPart("foo.js", [/^foo/, "bar"]); // true
ModuleFilenameHelpers.matchPart("foo.js", [/^foo/, /^bar/]); // true
ModuleFilenameHelpers.matchPart("foo.js", [/^baz/, /^bar/]); // false














replaceDuplicates(array, fn, comparator?): void