{"id":27268831,"url":"https://github.com/shevchenkool/localstorage","last_synced_at":"2026-05-18T00:07:50.158Z","repository":{"id":218708981,"uuid":"747155018","full_name":"ShevchenkoOl/localStorage","owner":"ShevchenkoOl","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-07T09:54:41.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-21T21:54:08.009Z","etag":null,"topics":["css3","html5","javascript","localstorage"],"latest_commit_sha":null,"homepage":"https://shevchenkool.github.io/localStorage/","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/ShevchenkoOl.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,"zenodo":null}},"created_at":"2024-01-23T11:28:47.000Z","updated_at":"2024-04-07T09:56:46.000Z","dependencies_parsed_at":"2024-04-07T10:44:24.684Z","dependency_job_id":null,"html_url":"https://github.com/ShevchenkoOl/localStorage","commit_stats":null,"previous_names":["shevchenkool/lokalstorage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ShevchenkoOl/localStorage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShevchenkoOl%2FlocalStorage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShevchenkoOl%2FlocalStorage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShevchenkoOl%2FlocalStorage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShevchenkoOl%2FlocalStorage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShevchenkoOl","download_url":"https://codeload.github.com/ShevchenkoOl/localStorage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShevchenkoOl%2FlocalStorage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33160168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","html5","javascript","localstorage"],"created_at":"2025-04-11T11:33:21.005Z","updated_at":"2026-05-18T00:07:50.126Z","avatar_url":"https://github.com/ShevchenkoOl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Methods for working with localStorage\n# Service for localStorage\nThis educational project is designed to visually work with Web storage. The basic commands are described here. To reduce the amount of repetitive code when working with web storage, you can write a service with standard methods, for example, save and load. They will abstract the repetitive parser error checking code and similar procedure (storage.js).\n\n• **setItem(key, value)** - creates a new or updates an existing record in the directory.\n\n_For example_:\n\n**```localStorage.setItem(\"ui-theme\", \"light\");```**\nIf you need to save a row, for example, an array or an object, you need to\ntransform their row using the **JSON.stringify()** method.\n``` \n    const settings = {\n    theme: \"dark\",\n    isAuthenticated: true,\n    options: [1, 2, 3],\n};\nlocalStorage.setItem(\"settings\", JSON.stringify(settings));\n```\n\n• **getItem(key)** - rotates the values under the key key.\n\n_For example:_\n```\nlocalStorage.setItem(\"ui-theme\", \"dark\");\nconst theme = localStorage.getItem(\"ui-theme\");\nconsole.log(theme);// \"dark\"\n\nOtherwise, you need to parse the values using the JSON.parse() method to extract the valid data.\n\nconst settings = {\n   theme: \"dark\",\n   isAuthenticated: true,\n   options: [1, 2, 3],\n};\nlocalStorage.setItem(\"settings\", JSON.stringify(settings));\nconst savedSettings = localStorage.getItem(\"settings\");\nconst parsedSettings = JSON.parse(savedSettings);\nconsole.log(parsedSettings);// settings object\n```\n• **removeItem(key)** - removes an entry with the key key from the folder.\n\n_For example:_\n```\nlocalStorage.setItem(\"ui-theme\", \"dark\");\nconsole.log(localStorage.getItem(\"ui-theme\"));// \"dark\"\n\nlocalStorage.removeItem(\"ui-theme\");\nconsole.log(localStorage.getItem(\"ui-theme\"));// null\n```\n• **clear()** - completely clears all storage records.\n_For example:_\n```\nlocalStorage.clear();\n```\n• **length** - number of records in the folder.# Markdown syntax guide\n\n## Usage\nTo use this repository, follow these steps:\n1. Clone the repository to your local computer;\n2. Go to the repository directory;\n3. Run each task following the instructions described in the corresponding task file.\n\n## Author\nThis repository was created and maintained by [Oleksii Shevchenko](https://shevchenkool.github.io/portfolio/). Questions, suggestions, and feedback can be directed to [email](uzlabini@gmail.com) or [linkedin profile](linkedin.com/in/oleksii-shevchenko-535ab61b8).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshevchenkool%2Flocalstorage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshevchenkool%2Flocalstorage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshevchenkool%2Flocalstorage/lists"}