On this page




createFilename(module, options, { requestShortener, chunkGraph, hashFunction }): string
Attributes
moduleFilenameTemplate:<string> | <Function>
namespace:<string>
chunkGraph:<ChunkGraph>
hashFunction:<string> | <typeof Hash>
requestShortener:<RequestShortener>
Returns:<string>





matchObject(obj, str): boolean
Attributes

matchPart(str, test): boolean
Attributes
string to test
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