{"id":20105925,"url":"https://github.com/markthree/reactivity-shared","last_synced_at":"2025-08-20T07:09:13.828Z","repository":{"id":57348259,"uuid":"450842075","full_name":"markthree/reactivity-shared","owner":"markthree","description":"通用的@vue/reactivity的use-api","archived":false,"fork":false,"pushed_at":"2024-02-28T08:55:20.000Z","size":61,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-13T15:41:47.241Z","etag":null,"topics":["reactivity","shared","use","vue-use"],"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/markthree.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-22T14:34:52.000Z","updated_at":"2024-02-28T08:52:51.000Z","dependencies_parsed_at":"2024-11-13T17:49:06.773Z","dependency_job_id":"b6ffca0a-0324-47e8-bdb6-bb41ed752ade","html_url":"https://github.com/markthree/reactivity-shared","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"markthree/template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Freactivity-shared","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Freactivity-shared/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Freactivity-shared/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Freactivity-shared/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markthree","download_url":"https://codeload.github.com/markthree/reactivity-shared/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241549089,"owners_count":19980475,"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":["reactivity","shared","use","vue-use"],"created_at":"2024-11-13T17:48:38.515Z","updated_at":"2025-03-02T17:47:00.424Z","avatar_url":"https://github.com/markthree.png","language":"TypeScript","readme":"# reactivity-shared\n\n\n    通用的@vue/reactivity的use-api\n\n\u003cbr /\u003e\n\n## Motation 🐗\n\n[vueuse](https://vueuse.org/) 是非常好用的 `use` 库，但却只能运行在 `web` 端，而这个库是 `vueuse` 中  不依赖环境的 `api` 👉 [@vueuse/shared](https://www.npmjs.com/package/@vueuse/shared) 的复刻与补充。可以运行在任何满足 `ES` 规范的环境，例如 `node`，`web` 等。当然也更激进，仅支持 `vue3`😋。\n\n\u003cbr /\u003e\n\n## Usage\n\n### Install package\n\n```sh\n# npm\nnpm install reactivity-shared\n\n# yarn\nyarn install reactivity-shared\n\n# pnpm\npnpm install reactivity-shared\n```\n\n### Import\n\n```js\n// ESM\nimport { ref, and, watch } from 'reactivity-shared'\n\nconst foo = ref(false)\nconst bar = ref(false)\n\nwatch(and(foo, bar), () =\u003e {\n    console.log(\"foo 和 bar 都为 true\")\n})\n\n// CommonJS\nconst { ref, and, watch } = require('reactivity-shared')\n\nconst foo = ref(false)\nconst bar = ref(false)\n\nwatch(and(foo, bar), () =\u003e {\n    console.log(\"foo 和 bar 都为 true\")\n})\n```\n\n\u003cbr /\u003e\n\n## License\n\nMade with markthree\n\nPublished under [MIT License](./LICENSE).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkthree%2Freactivity-shared","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkthree%2Freactivity-shared","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkthree%2Freactivity-shared/lists"}