{"id":13511374,"url":"https://github.com/imanubhardwaj/vue-entity-adapter","last_synced_at":"2025-04-12T20:42:23.672Z","repository":{"id":37849746,"uuid":"204990736","full_name":"imanubhardwaj/vue-entity-adapter","owner":"imanubhardwaj","description":"Package to maintain entities in Vuex.","archived":false,"fork":false,"pushed_at":"2023-01-04T08:22:55.000Z","size":5004,"stargazers_count":20,"open_issues_count":36,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T14:55:58.154Z","etag":null,"topics":["flux","state-management","vue","vue2","vuejs","vuejs2","vuex","vuex-orm-plugin","vuex-plugin","vuex-store","vuex2","vuex3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/imanubhardwaj.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":"2019-08-28T17:50:22.000Z","updated_at":"2020-12-05T18:12:49.000Z","dependencies_parsed_at":"2023-02-02T05:02:46.762Z","dependency_job_id":null,"html_url":"https://github.com/imanubhardwaj/vue-entity-adapter","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/imanubhardwaj%2Fvue-entity-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imanubhardwaj%2Fvue-entity-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imanubhardwaj%2Fvue-entity-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imanubhardwaj%2Fvue-entity-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imanubhardwaj","download_url":"https://codeload.github.com/imanubhardwaj/vue-entity-adapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631669,"owners_count":21136554,"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":["flux","state-management","vue","vue2","vuejs","vuejs2","vuex","vuex-orm-plugin","vuex-plugin","vuex-store","vuex2","vuex3"],"created_at":"2024-08-01T03:00:48.611Z","updated_at":"2025-04-12T20:42:23.647Z","avatar_url":"https://github.com/imanubhardwaj.png","language":"JavaScript","funding_links":[],"categories":["vue","JavaScript"],"sub_categories":[],"readme":"# Note\nThis project is a fork of the project of [Manu Bhardwaj](https://github.com/imanubhardwaj), \nYou can access the original project [here](https://github.com/imanubhardwaj/vue-entity-adapter).\n\n\nThe difference from this project to the original project, are just a few changes in the definitions for typescript and a small improvement in the ordering logic in the getAll method and in logic in addOne method.\n\n# Introduction\n\nEntity State adapter for managing record collections.\n\nEntity provides an API to manipulate and query entity collections.\n\nReduces boilerplate for creating reducers that manage a collection of models.\nProvides performant CRUD operations for managing entity collections.\nExtensible type-safe adapters for selecting entity information.\n\n#### [Example](example)\n\n## Installation\nInstalling with *npm*\n\n``npm i vue-entity-adapter-plus``\n\n## Getting Started\n\n* Create a ``EntityState``\n\n``interface TodoState extends EntityState\u003cTodo\u003e {}``\n\n* Create an ``EntityAdapter``\n\n``const todoAdapter = new EntityAdapter\u003cTodo\u003e();``\n\n## Adapter Methods\nThese methods are provided by the adapter object returned when using ``new EntityAdapter()``. The methods are used inside your mutations to manage the entity collection based on your provided actions.\n\n#### getInitialState\nReturns the initialState for entity state based on the provided type. Additional state is also provided through the provided configuration object. The initialState is provided to your reducer function.\n\n## Entity Selectors\n\n#### getOne\nReturns the entity with the given id.\n\n#### getAll\nReturns all entities from the state.\n\n#### getCount\nReturns the number of entities from the state.\n\n#### getIds\nReturns the ids of entities from the state.\n\n## Adapter Collection Methods\n\nThe entity adapter also provides methods for operations against an entity. These methods can change one to many records at a time. Each method returns the newly modified state if changes were made and the same state if no changes were made.\n\n* addOne: Add one entity to the collection\n* addMany: Add multiple entities to the collection\n* addAll: Replace current collection with provided collection\n* removeOne: Remove one entity from the collection\n* removeMany: Remove multiple entities from the collection, by id or by predicate\n* removeAll: Clear entity collection\n* updateOne: Update one entity in the collection\n* updateMany: Update multiple entities in the collection\n* upsertOne: Add or Update one entity in the collection\n* upsertMany: Add or Update multiple entities in the collection\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimanubhardwaj%2Fvue-entity-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimanubhardwaj%2Fvue-entity-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimanubhardwaj%2Fvue-entity-adapter/lists"}