{"id":18062801,"url":"https://github.com/ded/kizzy","last_synced_at":"2025-05-10T19:39:54.517Z","repository":{"id":1395684,"uuid":"1400944","full_name":"ded/Kizzy","owner":"ded","description":"A Local Storage Utility","archived":false,"fork":false,"pushed_at":"2012-11-27T18:30:26.000Z","size":160,"stargazers_count":195,"open_issues_count":1,"forks_count":20,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-09T10:57:09.396Z","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/ded.png","metadata":{"files":{"readme":"README.markdown","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-02-23T04:14:39.000Z","updated_at":"2024-03-26T17:50:41.000Z","dependencies_parsed_at":"2022-08-16T13:15:19.395Z","dependency_job_id":null,"html_url":"https://github.com/ded/Kizzy","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/ded%2FKizzy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2FKizzy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2FKizzy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2FKizzy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ded","download_url":"https://codeload.github.com/ded/Kizzy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253239405,"owners_count":21876457,"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-10-31T05:08:28.608Z","updated_at":"2025-05-09T10:57:18.614Z","avatar_url":"https://github.com/ded.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kizzy - a Local Storage Utility\n\nKizzy is a light-weight, cross-browser, JavaScript local storage utility. It leverages the HTML5 localStorage API when available, as well as Internet Explorer's persistent XML store — wrapped up in a easy to use, memcached-like interface. When neither of these features are available (unlikely), it falls back to an in-browser object store.\n\nIt looks like this\n\n``` js\nvar cache = kizzy('users')\nvar agent = cache.get('Agent')\nif (agent) {\n  alert('Welcome back ' + agent.name)\n} else {\n  cache.set('Agent', {\n    name: 'Agent Diaz'\n  })\n}\n```\n\nFurthermore, a call to 'set' will return the value, making it quite easy for assignment.\n\n``` js\nvar cache = kizzy('users')\nvar agent = cache.get('Agent') || cache.set('Agent', {\n  name: 'Agent Diaz'\n})\n```\n\nLastly, you can pass an optional third argument to 'set' that tells the cache how long to live\n\n``` js\nvar cache = kizzy('users')\n\nvar agent = cache.get('Agent') || cache.set('Agent', {\n  name: 'Agent Diaz'\n}, 5000) // time to live set for 5 seconds\n\n\n// wait 3 seconds...\nsetTimeout(function() {\n  alert('Still there ' + cache.get('Agent').name)\n}, 3000)\n\n// 6 seconds later...\nsetTimeout(function() {\n  cache.get('Agent').name // =\u003e expired\n}, 6000)\n```\n\n# Browser support\n\n  * Internet Explorer 6+\n  * Firefox 2+ (when localStorage is enabled (the browser default))\n  * Chrome\n  * Safari 4+\n  * Opera\n\n# Building Kizzy\n\n``` sh\n$ submodule update --init\n\u0026 make\n```\n\n# Running tests\n\nTests will not currently pass if run on a file:/// protocol. Otherwise...\n\n``` sh\n$ open tests/test.html\n```\n\n# Ender integration\n\nInstall Kizzy as an Ender module\n\n``` sh\n$ ender add kizzy\n```\n\nUse it as such:\n\n``` js\n$.cache('user').get('name')\n```\n\n# Kizzy whu?\n\nThe name comes from Kunta Kinte, a Mandinka African warrior from the 1700's. After being brought into slavery, he had a daughter whom he named Kizzy, which translates to *stay put* in hopes that the family would stay together, but not stay a slave.\n\nHappy Caching!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fded%2Fkizzy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fded%2Fkizzy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fded%2Fkizzy/lists"}