generated from HackYourFuture/core-assignment-week-6
-
Notifications
You must be signed in to change notification settings - Fork 19
Shadi A. #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shmoonwalker
wants to merge
4
commits into
HackYourAssignment:main
Choose a base branch
from
shmoonwalker:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Shadi A. #1
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
689eeda
set up project
shmoonwalker 38e7eea
Implement reading list functionality with book management features
shmoonwalker 8f42557
Implement reading list functionality with book management features
shmoonwalker d165a4e
format using prettier
shmoonwalker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| node_modules | ||
| dist | ||
| build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "semi": true, | ||
| "singleQuote": true, | ||
| "tabWidth": 2, | ||
| "trailingComma": "es5", | ||
| "printWidth": 80 | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "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", | ||
| "homepage": "https://github.com/shmoonwalker/c55-core-week-6#readme", | ||
| "bugs": { | ||
| "url": "https://github.com/shmoonwalker/c55-core-week-6/issues" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/shmoonwalker/c55-core-week-6.git" | ||
| }, | ||
| "license": "ISC", | ||
| "author": "", | ||
| "type": "module", | ||
| "main": "app.js", | ||
| "scripts": { | ||
| "start": "node app.js", | ||
| "format": "prettier --write \"**/*.js\"" | ||
| }, | ||
|
|
||
| "dependencies": { | ||
| "chalk": "^4.1.2" | ||
| }, | ||
| "devDependencies": { | ||
| "prettier": "^3.8.1" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,31 @@ | ||
| // This is the entrypoint for your application. | ||
| // node app.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 | ||
| import { | ||
| loadBooks, | ||
| addBook, | ||
| getUnreadBooks, | ||
| getBooksByGenre, | ||
| markAsRead, | ||
| printAllBooks, | ||
| printSummary, | ||
| } from './readingList.js'; | ||
|
|
||
| console.log('📚 MY READING LIST 📚\n'); | ||
|
|
||
| // Your implementation here | ||
| printAllBooks(); | ||
|
|
||
| addBook({ title: 'The Alchemist', author: 'Paulo Coelho', genre: 'Fiction' }); | ||
|
|
||
| printSummary(); | ||
|
|
||
| console.log('\n🔍 Fiction Books:'); | ||
| getBooksByGenre('Fiction').forEach((b) => | ||
| console.log(` ${b.read ? '✓' : '⚠'} ${b.title} by ${b.author}`) | ||
| ); | ||
|
|
||
| console.log('\n📌 Unread Books:'); | ||
| getUnreadBooks().forEach((b) => | ||
| console.log(` - ${b.title} by ${b.author} (id: ${b.id})`) | ||
| ); | ||
|
|
||
| markAsRead(3); | ||
|
|
||
| printSummary(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,44 @@ | ||
| [] | ||
| [ | ||
| { | ||
| "id": 1, | ||
| "title": "1984", | ||
| "author": "George Orwell", | ||
| "genre": "Fiction", | ||
| "read": false | ||
| }, | ||
| { | ||
| "id": 2, | ||
| "title": "To Kill a Mockingbird", | ||
| "author": "Harper Lee", | ||
| "genre": "Fiction", | ||
| "read": true | ||
| }, | ||
| { | ||
| "id": 3, | ||
| "title": "The Great Gatsby", | ||
| "author": "F. Scott Fitzgerald", | ||
| "genre": "Classic", | ||
| "read": true | ||
| }, | ||
| { | ||
| "id": 4, | ||
| "title": "The Hobbit", | ||
| "author": "J.R.R. Tolkien", | ||
| "genre": "Fantasy", | ||
| "read": true | ||
| }, | ||
| { | ||
| "id": 5, | ||
| "title": "Clean Code", | ||
| "author": "Robert C. Martin", | ||
| "genre": "Programming", | ||
| "read": false | ||
| }, | ||
| { | ||
| "title": "The Alchemist", | ||
| "author": "Paulo Coelho", | ||
| "genre": "Fiction", | ||
| "id": 6, | ||
| "read": false | ||
| } | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have an .env file... so no need to list it here.