{"id":23328935,"url":"https://github.com/itsawa/simplify-storage","last_synced_at":"2026-02-19T15:03:11.387Z","repository":{"id":269038451,"uuid":"906255505","full_name":"ITSawa/simplify-storage","owner":"ITSawa","description":"Simplify Storage is a JavaScript library for working with localStorage, sessionStorage, and cookies. It provides utilities to set, get, remove, and clear data, along with automatic type conversion for stored values, making client-side data management easy in web applications.","archived":false,"fork":false,"pushed_at":"2024-12-20T16:10:49.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T03:39:49.128Z","etag":null,"topics":["cookie","lib","library","localstorage","management","sessionstorage","simplification","simplify","storage","storage-management"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ITSawa.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":"2024-12-20T13:47:08.000Z","updated_at":"2024-12-20T16:10:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"29c0a55c-2dbb-496b-b46f-06f8a9760b13","html_url":"https://github.com/ITSawa/simplify-storage","commit_stats":null,"previous_names":["itsawa/simplify-storage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ITSawa/simplify-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSawa%2Fsimplify-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSawa%2Fsimplify-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSawa%2Fsimplify-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSawa%2Fsimplify-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ITSawa","download_url":"https://codeload.github.com/ITSawa/simplify-storage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSawa%2Fsimplify-storage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29619151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["cookie","lib","library","localstorage","management","sessionstorage","simplification","simplify","storage","storage-management"],"created_at":"2024-12-20T21:29:38.524Z","updated_at":"2026-02-19T15:03:11.367Z","avatar_url":"https://github.com/ITSawa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simplify Storage\n\n`Simplify Storage` is a JavaScript library for easily managing different types of web storage. It provides a unified interface to work with `localStorage`, `sessionStorage`, and `cookieStorage` with added features such as serialization and deserialization of data.\n\n## Features\n\n- Supports **localStorage**, **sessionStorage**, and **cookieStorage**.\n- Automatic serialization and deserialization of arrays and objects.\n- Easy-to-use API for storing, retrieving, and removing data.\n- Supports querying and clearing the storage.\n\n## Installation\n\nYou can install `simplify-storage` using npm:\n\n```bash\nnpm install simplify-storage\n```\nOr you can add it to your project directly via a \u003cscript\u003e tag in the HTML:\n\nhtml\n\n\u003cscript src=\"path-to-your-library/script.js\"\u003e\u003c/script\u003e\nAPI\nsetInStorage(key, data, type = \"local\")\nStores data in the specified storage type (localStorage, sessionStorage, or cookieStorage).\n\nParameters\n\nkey: The key under which the data will be stored.\ndata: The data to be stored. Can be a string, number, boolean, array, or object.\ntype: The type of storage to use. Defaults to localStorage.\nExample\n\njavascript\n\nsetInStorage(\"username\", \"JohnDoe\", \"local\");\ngetFromStorage(key, type)\nRetrieves the data stored under the specified key from the specified storage type.\n\nParameters\n\nkey: The key of the data to retrieve.\ntype: The type of storage to use. Defaults to localStorage.\nReturns: The stored data, or null if the key does not exist.\n\nExample\n\njavascript\n\nconst username = getFromStorage(\"username\", \"local\");\nconsole.log(username); // Outputs: \"JohnDoe\"\nremoveFromStorage(key, type = \"local\")\nRemoves the data stored under the specified key from the specified storage type.\n\nParameters\n\nkey: The key of the data to remove.\ntype: The type of storage to use. Defaults to localStorage.\nExample\n\njavascript\n\nremoveFromStorage(\"username\", \"local\");\nclearStorage(type = \"local\")\nClears all data from the specified storage type.\n\nParameters\n\ntype: The type of storage to clear. Defaults to localStorage.\nExample\n\njavascript\n\nclearStorage(\"local\");\ngetAllStorageItems(type = \"local\")\nReturns all items stored in the specified storage type.\n\nParameters\n\ntype: The type of storage to query. Defaults to localStorage.\nReturns: An array of objects, each containing a key and value.\n\nExample\n\njavascript\n\nconst items = getAllStorageItems(\"local\");\nconsole.log(items); // Outputs an array of stored items\nhasItemInStorage(key, type = \"local\")\nChecks if a specific key exists in the specified storage type.\n\nParameters\n\nkey: The key to check.\ntype: The type of storage to check. Defaults to localStorage.\nReturns: true if the key exists, false otherwise.\n\nExample\n\njavascript\n\nconst hasUsername = hasItemInStorage(\"username\", \"local\");\nconsole.log(hasUsername); // Outputs: true or false\nCookieStorage\nCookieStorage is a class that mimics the behavior of localStorage and sessionStorage, but stores data in cookies. It provides the same methods: setItem, getItem, removeItem, clear, key, and getAllItems.\n\nExample\njavascript\n\nconst cookieStorage = new CookieStorage();\ncookieStorage.setItem(\"user\", \"JaneDoe\");\nconsole.log(cookieStorage.getItem(\"user\")); // Outputs: \"JaneDoe\"\nLicense\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\nContributing\nIf you have any ideas or improvements for this library, feel free to fork it and create a pull request. Contributions are always welcome!\n\nContact\nFor any issues or suggestions, please open an issue or contact ITSawa.\n\n\n### Explanation:\n- The `README.md` explains the key features and functionality of the `simplify-storage` library.\n- The **API** section outlines how to use the library, with examples for storing, retrieving, and managing data in different storage types.\n- The `CookieStorage` class and its methods are described in detail, showcasing how it can be used as an alternative to other storage types.\n- The **Installation** and **License** sections provide basic setup instructions and licensing information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsawa%2Fsimplify-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsawa%2Fsimplify-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsawa%2Fsimplify-storage/lists"}