From 2a8f5635dccbea930ab4aa226b6801ea3fa85fdb Mon Sep 17 00:00:00 2001 From: Jan Barfuss Date: Sat, 23 Dec 2023 21:36:34 +0100 Subject: [PATCH] data structure bl --- src/stripper.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stripper.ts b/src/stripper.ts index 8e1163e..e1a7020 100644 --- a/src/stripper.ts +++ b/src/stripper.ts @@ -2,18 +2,18 @@ import * as cheerio from 'cheerio'; class Campus { name: string; - mensen: Mensa[]; + locations: Mensa[]; constructor(name: string) { this.name = name; - this.mensen = []; + this.locations = []; } addMensa(mensa: Mensa) { - this.mensen.push(mensa); + this.locations.push(mensa); } toString() { let str = this.name + "\n"; - this.mensen.forEach((elem) => { + this.locations.forEach((elem) => { str += " -> " + elem.name + " | " + elem.url + "\n"; }); return str;