{"id":19417192,"url":"https://github.com/effector/model","last_synced_at":"2025-04-24T13:33:25.438Z","repository":{"id":260309119,"uuid":"840857606","full_name":"effector/model","owner":"effector","description":"Effector models with ease","archived":false,"fork":false,"pushed_at":"2024-10-22T14:09:29.000Z","size":718,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-11-07T00:19:24.669Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/effector.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"zero_bias","open_collective":"effector"}},"created_at":"2024-08-10T22:48:06.000Z","updated_at":"2024-10-30T17:14:28.000Z","dependencies_parsed_at":"2024-10-30T17:16:39.817Z","dependency_job_id":"373cff60-b1f9-4cf0-b427-55c95ae26b50","html_url":"https://github.com/effector/model","commit_stats":null,"previous_names":["effector/model"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effector%2Fmodel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effector%2Fmodel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effector%2Fmodel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effector%2Fmodel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/effector","download_url":"https://codeload.github.com/effector/model/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223758534,"owners_count":17197744,"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-10T13:07:48.633Z","updated_at":"2025-04-24T13:33:25.423Z","avatar_url":"https://github.com/effector.png","language":"TypeScript","funding_links":["https://patreon.com/zero_bias","https://opencollective.com/effector"],"categories":[],"sub_categories":[],"readme":"# Model\n\nEffector models with ease\n\nWork in progress, api may change\n\n## API\n\n```ts\nimport { keyval } from '@effector/model';\n\nconst entities = keyval(() =\u003e {\n  const $id = createStore(0);\n  const $count = createStore(0);\n  const inc = createEvent();\n  $count.on(inc, (x) =\u003e x + 1);\n\n  const onMount = createEvent();\n\n  return {\n    state: {\n      id: $id,\n      count: $count,\n    },\n    api: { inc },\n    key: 'id',\n    optional: ['count'],\n    onMount,\n  };\n});\n\nentities.edit.add({ id: 1 });\nentities.edit.add([{ id: 2, count: 10 }]);\nentities.api.inc({ key: 1, value: undefined });\nentities.$items;\n```\n\n## Maintains\n\n### Getting started\n\n- clone repo\n- install deps via `pnpm install`\n- make changes\n- make sure that your changes is passing checks:\n  - run tests via `pnpm test`\n  - run type tests via `pnpm test:types`\n  - run linter via `pnpm lint`\n  - try to build it via `pnpm build`\n  - format code via `pnpm format`\n- fill in changes via `pnpm changes`\n- open a PR\n- enjoy 🎉\n\n### Release workflow\n\nReleases of Model are automated by [changesets](https://github.com/changesets/changesets) and GitHub Actions. Your only duty is creating changeset for every PR, it is controlled by [Changes-action](./.github/workflows/changes.yml).\n\nAfter merging PR to master-branch, [Version-action](./.github/workflows/version.yml) will update special PR with the next release. To publish this release, just merge special PR and wait, [Release-action](./.github/workflows/release.yml) will publish packages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffector%2Fmodel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feffector%2Fmodel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffector%2Fmodel/lists"}