Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 80,
"tabWidth": 2
}
86 changes: 86 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "c55-core-week-6",
"version": "1.0.0",
"description": "The week 6 assignment for the HackYourFuture Core program can be found at the following link: https://hub.hackyourfuture.nl/core-program-week-6-assignment",
"main": "index.js",
"scripts": {
"start": "node reading-list-manager/app.js"
},
"type": "module",
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"chalk": "^4.1.2"
}
}
15 changes: 14 additions & 1 deletion reading-list-manager/app.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
// This is the entrypoint for your application.
// node app.js

import {
getBooksByGenre,
loadBooks,
markAsRead,
printAllBooks,
printSummary,
} from './readingList.js';

// TODO: Implement the main application logic here
// 1. Load books on startup
// 2. Display all books
// 3. Show summary statistics
// 4. Add example of filtering by genre or read/unread status
// 5. Add example of marking a book as read

console.log('📚 MY READING LIST 📚\n');
// console.log('📚 MY READING LIST 📚\n');

// Your implementation here
console.log(loadBooks());
console.log(printAllBooks());
console.log(printSummary());
console.log('Get books by novel genre:', getBooksByGenre('Novel'));
console.log('After read update:', markAsRead(1));
45 changes: 44 additions & 1 deletion reading-list-manager/books.json
Original file line number Diff line number Diff line change
@@ -1 +1,44 @@
[]
[
{
"id": 1,
"title": "Kobzar",
"author": "Taras Shevchenko",
"genre": "Poetry",
"read": false
},
{
"id": 2,
"title": "Forest Song",
"author": "Lesya Ukrainka",
"genre": "Drama",
"read": false
},
{
"id": 3,
"title": "The Enchanted Desna",
"author": "Oleksandr Dovzhenko",
"genre": "Memoir",
"read": true
},
{
"id": 4,
"title": "The City",
"author": "Valerian Pidmohylny",
"genre": "Novel",
"read": false
},
{
"id": 5,
"title": "Marusia Churai",
"author": "Lina Kostenko",
"genre": "Historical Novel",
"read": false
},
{
"id": 6,
"title": "Death and the Penguin",
"author": "Andrey Kurkov",
"genre": "Novel",
"read": true
}
]
Loading