Use RegExp#test intead of String#match

This commit is contained in:
Maximilian Krög
2022-08-05 01:09:03 +02:00
parent 81c10fa609
commit 403b06b438
4 changed files with 6 additions and 9 deletions

View File

@@ -81,10 +81,10 @@ function includeAugments(doclet) {
function extractTypes(item) {
item.type.names.forEach(function (type) {
const match = type.match(/^(.*<)?([^>]*)>?$/);
const match = type.match(/^(?:.*<)?([^>]*)>?$/);
if (match) {
modules[match[2]] = true;
types[match[2]] = true;
modules[match[1]] = true;
types[match[1]] = true;
}
});
}