{"id":23084146,"url":"https://github.com/localforage/localforage-memorystoragedriver","last_synced_at":"2025-12-12T04:02:00.252Z","repository":{"id":37451081,"uuid":"58182649","full_name":"localForage/localForage-memoryStorageDriver","owner":"localForage","description":"A volatile, in memory storage driver for localForage.","archived":false,"fork":false,"pushed_at":"2016-08-31T12:23:31.000Z","size":15,"stargazers_count":17,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-13T09:37:56.052Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/localForage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-06T05:18:30.000Z","updated_at":"2023-10-24T14:04:29.000Z","dependencies_parsed_at":"2022-08-19T09:11:35.730Z","dependency_job_id":null,"html_url":"https://github.com/localForage/localForage-memoryStorageDriver","commit_stats":null,"previous_names":["localforage-extensions/localforage-memorystoragedriver"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localForage%2FlocalForage-memoryStorageDriver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localForage%2FlocalForage-memoryStorageDriver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localForage%2FlocalForage-memoryStorageDriver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localForage%2FlocalForage-memoryStorageDriver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localForage","download_url":"https://codeload.github.com/localForage/localForage-memoryStorageDriver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229988092,"owners_count":18155680,"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-16T15:49:15.957Z","updated_at":"2025-12-12T04:01:59.938Z","avatar_url":"https://github.com/localForage.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"localforage-memoryStorageDriver\n=================================\n[![npm](https://img.shields.io/npm/dm/localforage-memoryStorageDriver.svg)](https://www.npmjs.com/package/localforage-memoryStorageDriver)\n\nA **volatile**, in memory storage driver for [localForage](https://github.com/mozilla/localForage).\n\n**The stored data are lost after a page reload.**\nOriginally designed for unit-testing (especially SPAs) and as a fallback for environmets without any storage APIs.\n\nThis driver serializes the stored items, so that\n* it works consistently compared to the \"native\" localForage driver\n* modifications of retrieved (complex) objects do not affect the stored items.\n\n## Requirements\n\n* [localForage](https://github.com/mozilla/localForage) v1.4.0+\n\n## Installation\n`npm i localforage-memoryStorageDriver`\n\n## Example\n[jsfiddle](https://jsfiddle.net/dp2dzyL9/)\n```js\nlocalforage.defineDriver(memoryStorageDriver).then(function() {\n  return localforage.setDriver(memoryStorageDriver._driver);\n}).then(function() {\n  console.log('Active driver: ' + localforage.driver());\n  return localforage.setItem('test1', 'value1');\n}).then(function() {\n  console.log('setItem(\\'test1\\', \\'value1\\')');\n  return localforage.getItem('test1');\n}).then(function(value) {\n  console.log('getItem(\\'test1\\') =\u003e ' + value);\n  return localforage.clear();\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalforage%2Flocalforage-memorystoragedriver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalforage%2Flocalforage-memorystoragedriver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalforage%2Flocalforage-memorystoragedriver/lists"}