{"id":15462604,"url":"https://github.com/gr2m/localstorage-memory","last_synced_at":"2025-04-15T06:14:27.918Z","repository":{"id":25291599,"uuid":"28717672","full_name":"gr2m/localstorage-memory","owner":"gr2m","description":"localStorage-compatible API, but only stored in memory","archived":false,"fork":false,"pushed_at":"2025-02-11T22:58:57.000Z","size":31771,"stargazers_count":23,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T11:37:07.940Z","etag":null,"topics":[],"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/gr2m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"gr2m"}},"created_at":"2015-01-02T15:47:19.000Z","updated_at":"2025-02-11T22:58:55.000Z","dependencies_parsed_at":"2024-03-05T13:10:25.235Z","dependency_job_id":null,"html_url":"https://github.com/gr2m/localstorage-memory","commit_stats":{"total_commits":57,"total_committers":5,"mean_commits":11.4,"dds":0.3508771929824561,"last_synced_commit":"26ccbd173b5bdcbd95506ac1898d6664b9a54155"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Flocalstorage-memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Flocalstorage-memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Flocalstorage-memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Flocalstorage-memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr2m","download_url":"https://codeload.github.com/gr2m/localstorage-memory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248952752,"owners_count":21188497,"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-02T00:02:39.591Z","updated_at":"2025-04-15T06:14:27.900Z","avatar_url":"https://github.com/gr2m.png","language":"JavaScript","funding_links":["https://github.com/sponsors/gr2m"],"categories":[],"sub_categories":[],"readme":"# localstorage-memory\n\n\u003e localStorage-compatible API, but only stored in memory\n\n[![Build Status](https://travis-ci.org/gr2m/localstorage-memory.png?branch=master)](https://travis-ci.org/gr2m/localstorage-memory/)\n\n`localStorageMemory` provides all methods that `localStorage` in browsers\nprovides, but no data is persisted, it's only stored in memory. It can\nbe used as a drop-in replacement, the only exception being the\nAssociative array syntax `localStorage['myKey'] = 'myValue'`.\n\n\n## Download or Installation\n\n- Download [localstorage-memory.js](https://raw.githubusercontent.com/gr2m/localstorage-memory/master/lib/localstorage-memory.js)\n- or: install via Bower: `bower install --save localstorage-memory`\n- or: install via npm: `npm install --save localstorage-memory`\n\n\n## Usage\n\n```js\nlocalStorageMemory.getItem('unknown') // null\nlocalStorageMemory.setItem('foo', 123)\nlocalStorageMemory.getItem('foo') // \"123\"\nlocalStorageMemory.length // 1\nlocalStorageMemory.key(0) // \"foo\"\nlocalStorageMemory.clear()\nlocalStorageMemory.length // 0\n```\n\n\n# Related\n\n- https://github.com/lmaccherone/node-localstorage\n  provides a `localStorage` API, with data being persisted at provide path\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Flocalstorage-memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr2m%2Flocalstorage-memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Flocalstorage-memory/lists"}