{"id":22654429,"url":"https://github.com/andrewjh271/library","last_synced_at":"2025-03-29T07:43:35.335Z","repository":{"id":139233637,"uuid":"343651245","full_name":"andrewjh271/library","owner":"andrewjh271","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-08T23:12:26.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-03T21:37:37.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewjh271.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-02T05:01:06.000Z","updated_at":"2024-08-08T23:12:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c89a657-4e3b-4272-9d19-371ea309c3a4","html_url":"https://github.com/andrewjh271/library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewjh271%2Flibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewjh271%2Flibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewjh271%2Flibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewjh271%2Flibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewjh271","download_url":"https://codeload.github.com/andrewjh271/library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246156029,"owners_count":20732359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-09T09:50:28.319Z","updated_at":"2025-03-29T07:43:35.312Z","avatar_url":"https://github.com/andrewjh271.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library App\n\nSimple Javascript Library app, created as part of the Odin Project [curriculum](https://www.theodinproject.com/courses/javascript/lessons/library). View [live page](https://andrewjh271.github.io/library/).\n\nBooks can be sorted by any of the headings. Data is persisted using `localStorage`.\n\n###### Thoughts\n\nI originally did not have `toggleRead()` as a function of`Book`, so line 89 changed from the first line to the second:\n\n```javascript\nlibrary[index].read = !library[index].read;\n```\n\n```javascript\nlibrary[index].toggleRead();\n```\n\nI liked that the latter is more modular and readable, but it initially caused problems when recreating `library[]` using `JSON.parse` and `localStorage`, which cannot create custom objects. This was resolved with the line:\n\n```javascript\nlibrary = JSON.parse(storedLibrary).map((book) =\u003e new Book(book));\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjh271%2Flibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjh271%2Flibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjh271%2Flibrary/lists"}