{"id":42830648,"url":"https://github.com/weavedev/redux-local-storage","last_synced_at":"2026-01-30T11:27:31.282Z","repository":{"id":42780864,"uuid":"275027825","full_name":"weavedev/redux-local-storage","owner":"weavedev","description":"LocalStorage management wrapper for reduxables like redux-async.","archived":false,"fork":false,"pushed_at":"2022-12-11T11:30:37.000Z","size":1574,"stargazers_count":0,"open_issues_count":16,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T00:09:58.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://weavedev.github.io/redux-local-storage/","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/weavedev.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":"2020-06-25T22:33:21.000Z","updated_at":"2020-06-25T23:41:44.000Z","dependencies_parsed_at":"2023-01-26T22:10:21.253Z","dependency_job_id":null,"html_url":"https://github.com/weavedev/redux-local-storage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/weavedev/redux-local-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavedev%2Fredux-local-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavedev%2Fredux-local-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavedev%2Fredux-local-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavedev%2Fredux-local-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weavedev","download_url":"https://codeload.github.com/weavedev/redux-local-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavedev%2Fredux-local-storage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28911821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T08:15:08.179Z","status":"ssl_error","status_checked_at":"2026-01-30T08:14:31.507Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-30T11:27:30.557Z","updated_at":"2026-01-30T11:27:31.274Z","avatar_url":"https://github.com/weavedev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redux-local-storage\n\n[![Build Status - Travis CI](https://img.shields.io/travis/weavedev/redux-local-storage.svg)](https://travis-ci.org/weavedev/redux-local-storage)\n[![Test Coverage - Code Climate](https://img.shields.io/codeclimate/coverage/weavedev/redux-local-storage.svg)](https://codeclimate.com/github/weavedev/redux-local-storage/test_coverage)\n[![GPL-3.0](https://img.shields.io/github/license/weavedev/redux-local-storage.svg)](https://github.com/weavedev/redux-local-storage/blob/master/LICENSE)\n[![NPM](https://img.shields.io/npm/v/@weavedev/redux-local-storage.svg)](https://www.npmjs.com/package/@weavedev/redux-local-storage)\n\nLocalStorage management wrapper for [reduxables](https://github.com/weavedev/reduxable/) like [redux-async](https://github.com/weavedev/redux-async/).\n\n## Install\n\n```\nnpm i @weavedev/redux-local-storage\n```\n\n## API documentation\n\nWe generate API documentation with [TypeDoc](https://typedoc.org).\n\n[![API Documentation](https://img.shields.io/badge/API-Documentation-blue?style=for-the-badge\u0026logo=typescript)](https://weavedev.github.io/redux-local-storage/)\n\n## Usage\n\n### Creating\n\nIn this example we wrap a [ReduxAsync](https://github.com/weavedev/redux-async/) object in a ReduxLocalStorage object to save state changes to localStorage and load existing state from localStorage on init.\n\n```ts\nimport { ReduxAsync } from '@weavedev/redux-async';\nimport { ReduxLocalStorage } from '@weavedev/redux-local-storage';\n\nexport const storedResource = new ReduxLocalStorage(new ReduxAsync( ... ), 'localStorageKey');\n\n// If you are also using our store package (@weavedev/store)\nwindow.storeReducers.storedResource = storedResource.reducer;\nwindow.storeSagas.storedResource = storedResource.saga;\n\ndeclare global {\n    interface StoreReducersMap {\n        storedResource: typeof storedResource.reducer;\n    }\n\n    interface StoreActionsMap {\n        storedResource: typeof storedResource.actions;\n    }\n}\n```\n\n### Options\n\nYou can change the saving behaviour by providing an options object.\n\n```ts\nexport const storedResource = new ReduxLocalStorage(\n    new ReduxAsync( ... ),\n    'localStorageKey',\n    reduxLocalStorageOptions,\n);\n```\n\n#### Options object\n\n```ts\n{\n    /**\n     * Add a custom transformer between localStorage and the runtime state.\n     * Usefull for objects that can not be serialized.\n     */\n    transform: {\n        // Convert saved state to runtime state\n        read: (s: string): MyAsyncState =\u003e ({ data: s }),\n\n        // Convert runtime state to saved state\n        write: (s: MyAsyncState): string =\u003e s.data,\n    },\n\n    /**\n     * By default ReduxLocalStorage saves to localStorage whenever the state changed.\n     * If you only want to save on specific action types you can provide an array.\n     */\n    triggers: ['MY_ASYNC_ACTION_TRIGGER', 'MY_ASYNC_ACTION_CALLBACK'],\n}\n```\n\n## License\n\n[GPL-3.0](https://github.com/weavedev/redux-local-storage/blob/master/LICENSE)\n\nMade by [Paul Gerarts](https://github.com/gerarts) and [Weave](https://weave.nl)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavedev%2Fredux-local-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweavedev%2Fredux-local-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavedev%2Fredux-local-storage/lists"}