{"id":26278624,"url":"https://github.com/sonukr/store","last_synced_at":"2025-03-14T13:17:03.262Z","repository":{"id":57369066,"uuid":"124922210","full_name":"Sonukr/store","owner":"Sonukr","description":"A tiny localStorage Wrapper.","archived":false,"fork":false,"pushed_at":"2018-03-13T17:32:13.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-22T12:05:24.904Z","etag":null,"topics":["javascript","localdb","localstorage","localstorage-api","storage"],"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/Sonukr.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}},"created_at":"2018-03-12T16:57:25.000Z","updated_at":"2018-03-13T17:32:15.000Z","dependencies_parsed_at":"2022-09-15T16:12:31.635Z","dependency_job_id":null,"html_url":"https://github.com/Sonukr/store","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/Sonukr%2Fstore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sonukr%2Fstore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sonukr%2Fstore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sonukr%2Fstore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sonukr","download_url":"https://codeload.github.com/Sonukr/store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243581087,"owners_count":20314167,"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":["javascript","localdb","localstorage","localstorage-api","storage"],"created_at":"2025-03-14T13:17:02.717Z","updated_at":"2025-03-14T13:17:03.246Z","avatar_url":"https://github.com/Sonukr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Store\nA tiny API wrapper for `localStorage` that lets you safely save numbers, arrays, objects and other data types.\n\n\n## Usage and API\n\n#### Include the store.min.js \n\n```javascript \n\u003cscript src=\"https://rawgit.com/Sonukr/store/master/store.min.js\"\u003e\u003c/script\u003e\n```\n\n#### Usage\n\n```javascript\n\n// define some data\nvar Array = [\n  {\n    name: 'Objects 1',\n    count: 10\n  },\n  {\n    name: 'Objects 2',\n    count: 11\n  }\n];\n\nvar String = 'This is a text and i will save in store.';\n\n// You can pas any kind of data type in value field like, array, object, string etc.\n// save data into localStorage.\n// API: store.set(key, value)\n// key — string\n// value - array\nstore.set('Array', Array); \n\n// save data into localStorage.\n// API: store.set(key, value)\n// key — string\n// value - string\nstore.set('String', String); \n\n// get value from localStorage by key.\n// API: store.get(key)\n// key — string\nstore.get('Array');\n\u003e [{name: 'Objects 1',count: 10},{name: 'Objects 2',count: 11}]\n\n\n// get value from localStorage by key.\n// API: store.get(key)\n// key — string\nstore.get('String');\n\u003e 'This is a text and i will save in store.';\n\n// remove item from localStorage\nstore.remove('Array');\nstore.remove('String');\n\n//get entire localStorage object\nstore.all\n\u003e  Storage {\n     Array: \"[{\"name\":\"Objects 1\",\"count\":10},{\"name\":\"Objects 2\",\"count\":11}]\",\n     String: \"\"This is a text and i will save in store.\"\", length: 2\n     }\n\n// get localStorage items count\nstore.length\n\u003e 2\n\n// or empty localStorage\nstore.clear();\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonukr%2Fstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonukr%2Fstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonukr%2Fstore/lists"}