MCPcopy
hub / github.com/victorporof/Sublime-HTMLPrettify / hasDisallowedFilePathPattern

Function hasDisallowedFilePathPattern

src/js/utils/fileUtils.js:16–23  ·  view source on GitHub ↗
(fileType, filePath)

Source from the content-addressed store, hash-verified

14// Checks if a file path is allowed by regexing the file name and expecting
15// it not to match certain expressions.
16const hasDisallowedFilePathPattern = (fileType, filePath) => {
17 for (const pattern of (GLOBAL_FILE_RULES[fileType] || {}).disallowed_file_patterns || []) {
18 if (filePath.match(new RegExp(pattern, 'i'))) {
19 return true;
20 }
21 }
22 return false;
23};
24
25// Checks if a file is of a particular type by regexing the file name and
26// expecting a certain extension.

Callers 4

isCSSFunction · 0.85
isHTMLFunction · 0.85
isJSONFunction · 0.85
isJSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected