@ckirby/opera-info
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -20,3 +20,3 @@ import re from "@ckirby/block-re"; | ||
const optional = names.map((n) => `(?:${n}\\s+)?`).join(""); | ||
const composerPattern = new RegExp(`\\b${optional}(?:${last})\\b`, "g"); | ||
const composerPattern = re `/\b${optional}(?:${last})\b/g`; | ||
target = target.replace(/\bthe\s+composer\b/g, "THE_COMPOSER"); | ||
@@ -26,7 +26,7 @@ target = target.replace(composerPattern, "the composer"); | ||
target = target.replace(/(?<!the first )\b(?:composed )?by the composer/, ""); | ||
target = target.replace(/\bthe composer the composer\b/g, "the composer"); | ||
target = target.replace(/the ([A-Z]\w+) composer the composer(?!')/g, (_, adjective) => /^[aeiou]/i.test(adjective) | ||
target = target.replace(/\b[tT]he composer the composer\b/g, "the composer"); | ||
target = target.replace(/[tT]he ([A-Z]\w+) composer the composer(?!')/g, (_, adjective) => /^[aeiou]/i.test(adjective) | ||
? `an ${adjective} composer` | ||
: `a ${adjective} composer`); | ||
target = target.replace(/(?<!(?:the|an?) )\b([A-Z]\w+) composer the composer(?!')/g, (_, adjective) => /^[aeiou]/i.test(adjective) | ||
target = target.replace(/(?<!(?:[Tt]he|[Aa]n?) )\b([A-Z]\w+) composer the composer(?!')/g, (_, adjective) => /^[aeiou]/i.test(adjective) | ||
? `an ${adjective} composer` | ||
@@ -33,0 +33,0 @@ : `a ${adjective} composer`); |
@@ -9,2 +9,3 @@ import type { OperaData, ListedOpera, TargetOpera } from "./types.js"; | ||
map<T>(fn: (opera: OperaData, index: number, list: OperaData[]) => T): T[]; | ||
filter(fn: (opera: OperaData, index: number, list: OperaData[]) => boolean): OperaData[]; | ||
[Symbol.iterator](): IterableIterator<OperaData>; | ||
@@ -11,0 +12,0 @@ getOperaByTitleHref(href: string): Promise<ListedOpera | null>; |
@@ -22,2 +22,5 @@ import { operaList, getTitles, getLanguage, getComposerSummary, getRecordings, getSummary, getInfoBox, getRoles, } from "./opera-getters.js"; | ||
} | ||
filter(fn) { | ||
return this.operas.filter(fn); | ||
} | ||
[Symbol.iterator]() { | ||
@@ -24,0 +27,0 @@ return this.operas[Symbol.iterator](); |
{ | ||
"name": "@ckirby/opera-info", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "information about operas", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4068626
28128