MCPcopy
hub / github.com/jsdoc/jsdoc / isIncluded

Method isIncluded

lib/jsdoc/src/filter.js:39–61  ·  view source on GitHub ↗

* @param {string} filepath - The filepath to check. * @returns {boolean} Should the given file be included?

(filepath)

Source from the content-addressed store, hash-verified

37 * @returns {boolean} Should the given file be included?
38 */
39 isIncluded(filepath) {
40 let included = true;
41
42 filepath = path.resolve(env.pwd, filepath);
43
44 if ( this.includePattern && !this.includePattern.test(filepath) ) {
45 included = false;
46 }
47
48 if ( this.excludePattern && this.excludePattern.test(filepath) ) {
49 included = false;
50 }
51
52 if (this.exclude) {
53 this.exclude.forEach(exclude => {
54 if ( filepath.indexOf(exclude) === 0 ) {
55 included = false;
56 }
57 });
58 }
59
60 return included;
61 }
62}
63exports.Filter = Filter;

Callers 2

scanMethod · 0.80
filter.jsFile · 0.80

Calls 1

testMethod · 0.80

Tested by

no test coverage detected