{"id":18541285,"url":"https://github.com/cyclejs/storage","last_synced_at":"2025-05-07T21:30:08.246Z","repository":{"id":55620048,"uuid":"45843789","full_name":"cyclejs/storage","owner":"cyclejs","description":"A Cycle.js Driver for using localStorage and sessionStorage.","archived":false,"fork":false,"pushed_at":"2020-12-17T20:24:14.000Z","size":213,"stargazers_count":51,"open_issues_count":7,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-27T14:27:02.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyclejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-09T14:37:05.000Z","updated_at":"2022-11-14T15:49:11.000Z","dependencies_parsed_at":"2022-08-15T04:40:27.015Z","dependency_job_id":null,"html_url":"https://github.com/cyclejs/storage","commit_stats":null,"previous_names":["kahlil/cycle-storage-driver"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyclejs%2Fstorage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyclejs%2Fstorage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyclejs%2Fstorage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyclejs%2Fstorage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyclejs","download_url":"https://codeload.github.com/cyclejs/storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252655656,"owners_count":21783517,"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-11-06T20:04:33.295Z","updated_at":"2025-05-07T21:30:08.193Z","avatar_url":"https://github.com/cyclejs.png","language":"TypeScript","funding_links":[],"categories":["Libraries"],"sub_categories":["Drivers"],"readme":"# Cycle Storage Driver\n\nA [Cycle.js](http://cycle.js.org) [Driver](http://cycle.js.org/drivers.html) for using\n[localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) and\n[sessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)\n in the browser.\n\n```\nnpm install --save @cycle/storage\n```\n\n## Usage\n\nYou can read the [API docs here](https://github.com/kahlil/cycle-storage-driver/blob/master/docs/api.md).\n\nBasics:\n\n```js\nimport Cycle from '@cycle/core';\nimport storageDriver from '@cycle/storage';\n\nfunction main(responses) {\n  // ...\n}\n\nconst drivers = {\n  storage: storageDriver\n}\n\nCycle.run(main, drivers);\n```\n\nSimple and normal use case ([JSBin demo](http://jsbin.com/xumuqi/15/edit?html,js,console,output)):\n\n```js\nfunction main({DOM, storage}) {\n   const storageRequest$ = DOM.select('input')\n    .events('keypress')\n    .map(function(ev) {\n      return {\n        key: 'inputText',\n        value: ev.target.value\n      };\n    });\n\n  return {\n    DOM: storage.local\n    .getItem('inputText')\n    .startWith('')\n    .map((text) =\u003e\n      h('input', {\n        type: 'text',\n        value: text\n      })\n    ),\n    storage: storageRequest$\n  };\n}\n```\n\n# License\n\n[MIT](https://github.com/kahlil/cycle-storage-driver/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyclejs%2Fstorage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyclejs%2Fstorage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyclejs%2Fstorage/lists"}