@@ -26,28 +26,28 @@ export class LjMcwilliamsLoader implements Loader {
2626 . createReadStream ( 'data/media_items.csv' , 'utf-8' )
2727 . pipe ( csv ( ) ) ;
2828 for await ( const row of readable ) {
29- /**this destructures the CSV file rows */
29+ /**This destructures the CSV file rows. */
3030 const { id, type, title, year } = row ;
3131 media . push ( new MediaItem ( id , title , type , year , [ ] ) ) ;
3232 }
3333 return media ;
3434 }
3535
3636 /*
37- an asyncchronous function named loadCredits
38- returns a Promise of an array of Credit Objects
37+ An asyncchronous function named loadCredits
38+ returns a Promise of an array of Credit Objects.
3939 */
4040 async loadCredits ( ) : Promise < Credit [ ] > {
4141 //the empty credits array will store parsed credit data
4242 const credits = [ ] ;
4343 /**
44- * this var creates a readable stream from the CSV file and
45- * is piped through the csv function to parse the data
44+ * This var creates a readable stream from the CSV file and
45+ * is piped through the csv function to parse the data.
4646 */
4747 const readable = fs
4848 . createReadStream ( 'data/credits.csv' , 'utf-8' )
4949 . pipe ( csv ( ) ) ;
50- //this asynchronously iterates over each row of the parsed CSV data
50+ //This asynchronously iterates over each row of the parsed CSV data.
5151 for await ( const row of readable ) {
5252 const { media_item_id, role, name } = row ;
5353 credits . push ( new Credit ( media_item_id , name , role ) ) ;
0 commit comments