{"id":22165286,"url":"https://github.com/doochik/safels","last_synced_at":"2025-07-21T09:05:03.917Z","repository":{"id":143235816,"uuid":"2169458","full_name":"doochik/SafeLS","owner":"doochik","description":"Wrap every localStorage method in try-catch","archived":false,"fork":false,"pushed_at":"2013-12-12T07:49:28.000Z","size":100,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T03:41:31.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/doochik.png","metadata":{"files":{"readme":"README","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}},"created_at":"2011-08-07T17:18:03.000Z","updated_at":"2016-11-30T09:04:00.000Z","dependencies_parsed_at":"2023-03-17T06:41:10.658Z","dependency_job_id":null,"html_url":"https://github.com/doochik/SafeLS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/doochik/SafeLS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doochik%2FSafeLS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doochik%2FSafeLS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doochik%2FSafeLS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doochik%2FSafeLS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doochik","download_url":"https://codeload.github.com/doochik/SafeLS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doochik%2FSafeLS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266270448,"owners_count":23902734,"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-02T05:14:21.375Z","updated_at":"2025-07-21T09:05:03.893Z","avatar_url":"https://github.com/doochik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"I've wroten this localStorage wrapper because noticed that every method throws exceptions.\nHere is some examples.\n\nMethod localStorage.setItem throws follow exceptions:\n  - Chome:\n    code: 22\n    message: QUOTA_EXCEEDED_ERR: DOM Exception 22\n    name: QUOTA_EXCEEDED_ERR\n    \n  - Firefox:\n    code: 1014\n    name: Persistent storage maximum size reached\n    message: NS_ERROR_DOM_QUOTA_REACHED\n\n  - Interner Explorer:\n    code: none\n    name: none\n    message: Not enough storage is available to complete this operation\n\n\nUnknown and undocumented exceptions of other methods (some examples, most of them I catch from Firefox and IE):\n  name: NS_ERROR_FAILURE\n  message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMStorage.setItem]\n  message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMStorage.clear]\n  message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMStorage.getitem]\n\n  name: NS_ERROR_FILE_CORRUPTED\n  message: Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [nsIDOMStorage2.clear]\n  message: Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [nsIDOMStorage2.getItem]\n\n  name: NS_ERROR_STORAGE_IOERR\n  message: Component returned failure code: 0x80630002 (NS_ERROR_STORAGE_IOERR) [nsIDOMStorage.clear]\n  message: Component returned failure code: 0x80630002 (NS_ERROR_STORAGE_IOERR) [nsIDOMStorage.removeitem]\n\n  name: NS_ERROR_FILE_NO_DEVICE_SPACE\n  message: Сomponent returned failure code: 0x80520010 (NS_ERROR_FILE_NO_DEVICE_SPACE) [nsIDOMStorage2.clear]\n  message: Сomponent returned failure code: 0x80520010 (NS_ERROR_FILE_NO_DEVICE_SPACE) [nsIDOMStorage2.removeItem]\n\n  message: access denied.\n\n  name: NS_ERROR_FILE_ACCESS_DENIED\n  message: Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIDOMStorage.removeItem]","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoochik%2Fsafels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoochik%2Fsafels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoochik%2Fsafels/lists"}