in packages/pressreader/src/processEdition.ts [250:272]
export function processFrontData(
front: FrontSourceWithData,
collectionMismatchAlarm: () => void,
): string[] {
const collections = front.collectionIds
.map((identifiers) => {
const maybeCollection = front.data.collections.find((collection, index) =>
matchCollection(collection, index, identifiers),
);
decideAlerts(
maybeCollection,
identifiers,
collectionMismatchAlarm,
front.sectionContentURL,
);
return maybeCollection;
})
.filter(isNotUndefined);
const articles = collections.flatMap((collection) => {
return collection.content.map((article) => article.id);
});
return articles;
}