mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2969] Moved doc tools to new tools folder (#3314)
* [ADF-2969] Moved doc tools to new tools folder * [ADF-2969] Added files missing from schematic * [ADF-2969] Added missing files to schematic
This commit is contained in:
committed by
Eugenio Romano
parent
9d0ccff189
commit
60644d9917
29
tools/doc/stoplist.js
Normal file
29
tools/doc/stoplist.js
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var fs = require("fs");
|
||||
/* "Stoplist" of regular expressions to match against strings. */
|
||||
var Stoplist = /** @class */ (function () {
|
||||
function Stoplist(slFilePath) {
|
||||
var listExpressions = JSON.parse(fs.readFileSync(slFilePath, 'utf8'));
|
||||
this.regexes = [];
|
||||
if (listExpressions) {
|
||||
for (var i = 0; i < listExpressions.length; i++) {
|
||||
this.regexes.push(new RegExp(listExpressions[i]));
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.regexes = [];
|
||||
}
|
||||
}
|
||||
// Check if an item is covered by the stoplist and reject it if so.
|
||||
Stoplist.prototype.isRejected = function (itemName) {
|
||||
for (var i = 0; i < this.regexes.length; i++) {
|
||||
if (this.regexes[i].test(itemName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
return Stoplist;
|
||||
}());
|
||||
exports.Stoplist = Stoplist;
|
Reference in New Issue
Block a user