Skip to content

Commit

Permalink
chore: made lesson_10 and lesson_10 extra credit seperate branches;
Browse files Browse the repository at this point in the history
  • Loading branch information
“A1-4U2T1NN” committed Oct 17, 2024
1 parent fcbf22c commit 36a334d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lesson_10/libraries/src/loaders/chigazo_graham_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export class ChigazoGrahamLoader implements Loader {

async loadMediaItems(): Promise<MediaItem[]> {
// TODO: Implement this method.
const mediaItems: MediaItem[] = [];
const readable = fs.readFileSync('data/media_items.csv', {
encoding: 'utf-8'
});
const mediaItems = [];
const readable = fs
.createReadStream('data/credits.csv', 'utf-8')
.pipe(csv());
for await (const row of readable) {
const { id, type, title, genre, year } = row;
mediaItems.push(new MediaItem( id, type, title, genre, year, ));
Expand Down

0 comments on commit 36a334d

Please sign in to comment.