{"id":21404762,"url":"https://github.com/fakundo/redux-entities","last_synced_at":"2025-03-16T16:48:45.882Z","repository":{"id":41786907,"uuid":"109628628","full_name":"fakundo/redux-entities","owner":"fakundo","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-07T04:14:04.000Z","size":2187,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T17:59:42.384Z","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/fakundo.png","metadata":{"files":{"readme":"README.md","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":"2017-11-06T00:27:48.000Z","updated_at":"2021-04-15T15:28:24.000Z","dependencies_parsed_at":"2023-02-06T11:30:41.705Z","dependency_job_id":null,"html_url":"https://github.com/fakundo/redux-entities","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/fakundo%2Fredux-entities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fredux-entities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fredux-entities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fredux-entities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fakundo","download_url":"https://codeload.github.com/fakundo/redux-entities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902291,"owners_count":20366259,"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-22T16:18:00.305Z","updated_at":"2025-03-16T16:48:45.848Z","avatar_url":"https://github.com/fakundo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Entities manager\n\nReducer, actions \u0026 selectors created to simplify work with entities.\n\n### Installation\n```\nyarn add @fakundo/redux-entities\n```\n\n### Creating reducer\n\n```js\nimport { createReducer } from 'redux-entities'\nconst collectionNames = ['subjects', 'users']\nexport default createReducer(collectionNames)\n```\n\n### Actions (action creators)\n\n- replaceEntities(collectionName, entities)\n- mergeEntities(collectionName, entities)\n- deleteEntities(collectionName, ...entityKeys)\n- replaceCollections(collections)\n- mergeCollections(collections)\n- purgeCollections(...collectionNames)\n- purgeAllCollections()\n\n### Selectors\n\n- getEntities(state, collectionName, ...entityKeys)\n- getEntity(state, collectionName, entityKey)\n- getCollection(state, collectionName)\n\n### With custom reducer\n\n```js\nimport { createReducer } from 'redux-entities'\n\nconst createCustomReducer = initialState =\u003e (state, action) =\u003e {\n  switch (action.type) {\n    case LOG_OUT:\n      return initialState\n\n    detault:\n      return state\n  }\n}\n\nexport default createReducer(['subjects', 'users'], createCustomReducer)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffakundo%2Fredux-entities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffakundo%2Fredux-entities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffakundo%2Fredux-entities/lists"}