thingy
This commit is contained in:
parent
2b65c74654
commit
fa75cf7172
2 changed files with 10 additions and 3 deletions
11
cli.ts
11
cli.ts
|
@ -34,7 +34,9 @@ for (const row of dom.querySelectorAll("tr")) {
|
||||||
.filter((n) => n.nodeName === "TD")
|
.filter((n) => n.nodeName === "TD")
|
||||||
.map((n) => n.textContent.trim());
|
.map((n) => n.textContent.trim());
|
||||||
// Skip invalid entries
|
// Skip invalid entries
|
||||||
if (!institution || !location || !entry || !code || entry === "Names TBA") continue;
|
if (!institution || !location || !entry || !code || entry === "Names TBA") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
entries.push({
|
entries.push({
|
||||||
institution,
|
institution,
|
||||||
|
@ -104,7 +106,12 @@ const nsdaSearchResults = await Promise
|
||||||
schoolFilterUsed = true;
|
schoolFilterUsed = true;
|
||||||
|
|
||||||
nsdaLookup = nsdaLookup.filter((ee) =>
|
nsdaLookup = nsdaLookup.filter((ee) =>
|
||||||
ee.school_name.toLowerCase().includes(e.institution.toLowerCase())
|
ee.school_name.replace(/[^a-zA-Z0-9 -]/g, "").toLowerCase().includes(
|
||||||
|
e.institution.replace(/[^a-zA-Z0-9 -]/g, "").toLowerCase(),
|
||||||
|
) ||
|
||||||
|
e.institution.replace(/[^a-zA-Z0-9 -]/g, "").toLowerCase().includes(
|
||||||
|
ee.school_name.replace(/[^a-zA-Z0-9 -]/g, "").toLowerCase(),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue