{"id":18614919,"url":"https://github.com/andrewjbateman/javascript-local-storage","last_synced_at":"2025-11-03T03:30:31.225Z","repository":{"id":96860625,"uuid":"160504758","full_name":"AndrewJBateman/javascript-local-storage","owner":"AndrewJBateman","description":":clipboard: Exercise to understand how local storage works in storing item settings, From Wes Bos Javascript30 Youtube series, tutorial 15. ","archived":false,"fork":false,"pushed_at":"2021-06-17T15:02:31.000Z","size":3499,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T02:44:56.768Z","etag":null,"topics":["css3","developer-tools","html5","javascript30","localstorage"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/AndrewJBateman.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":"2018-12-05T10:57:59.000Z","updated_at":"2023-03-12T18:45:23.000Z","dependencies_parsed_at":"2023-03-30T11:35:57.413Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/javascript-local-storage","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/AndrewJBateman%2Fjavascript-local-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fjavascript-local-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fjavascript-local-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fjavascript-local-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/javascript-local-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406449,"owners_count":19633024,"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":["css3","developer-tools","html5","javascript30","localstorage"],"created_at":"2024-11-07T03:27:25.745Z","updated_at":"2025-11-03T03:30:31.195Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"HTML","readme":"# :zap: Javascript30 Local Storage\n\n* Wes Bos Youtube Tutorial: [How LocalStorage and Event Delegation work. #JavaScript30 15/30](https://www.youtube.com/watch?v=YL1F4dCUlLc\u0026index=15\u0026list=PLu8EoSxDXHP6CGK4YVJhL_VWetA865GOH).\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/javascript-local-storage?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/javascript-local-storage?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/javascript-local-storage?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/javascript-local-storage?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Javascript30 Local Storage](#zap-javascript30-local-storage)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* Tutorial using a restaurant menu list to explain how HTML local storage works using key-value strings.\n\n## :camera: Screenshots\n\n![Example screenshot](./img/storage.png).\n\n## :signal_strength: Technologies\n\n* [Javascript v1.9 ECMA-262 ECMAScript 2020](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\n* [HTML local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)\n\n## :floppy_disk: Setup\n\n* Open index.html in browser. If any code is changed the browser needs to be refreshed.\n\n## :computer: Code Examples\n\n* Code to add item to local storage\n\n```javascript\nfunction addItem(e) {\n  e.preventDefault(); // prevent the browser from performing the default action for that element (page refresh).\n  const text = (this.querySelector('[name=item]')).value;\n  console.log('text', text); // example text: text lettuce\n  const item = {\n    text,\n    done: false\n  };\n\n  items.push(item);\n  populateList(items, itemsList); //run this function to add items to the plates list.\n\n  // add to local storage using setItem and JSON.stringify to change object to a string.\n  localStorage.setItem('items', JSON.stringify(items));\n  this.reset();\n}\n```\n\n## :cool: Features\n\n* Uses HTML local storage so items not lost in the event of a page refresh etc.\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working.\n* To-Do: This code can be enhanced with an option to set as 'done' or clear all items in the plates list.\n\n## :clap: Inspiration\n\n* Wes Bos Youtube Tutorial: [How LocalStorage and Event Delegation work. #JavaScript30 15/30](https://www.youtube.com/watch?v=YL1F4dCUlLc\u0026index=15\u0026list=PLu8EoSxDXHP6CGK4YVJhL_VWetA865GOH)\n\n## :file_folder: License\n\n* N/A\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fjavascript-local-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fjavascript-local-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fjavascript-local-storage/lists"}