{"id":19268718,"url":"https://github.com/flingyp/flypeng-tool","last_synced_at":"2025-08-17T01:33:36.811Z","repository":{"id":49373890,"uuid":"516570913","full_name":"flingyp/flypeng-tool","owner":"flingyp","description":"Integrate a collection of common tools and methods","archived":false,"fork":false,"pushed_at":"2025-08-08T09:45:59.000Z","size":11032,"stargazers_count":16,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-08T09:46:34.373Z","etag":null,"topics":["javascript","tool","typescript","util","vitepress","vitest"],"latest_commit_sha":null,"homepage":"https://flingyp.github.io/flypeng-tool","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/flingyp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2022-07-22T01:27:33.000Z","updated_at":"2025-08-08T09:46:03.000Z","dependencies_parsed_at":"2024-01-11T10:28:53.234Z","dependency_job_id":"25d886be-8d24-436c-8657-b3797a0bcd63","html_url":"https://github.com/flingyp/flypeng-tool","commit_stats":{"total_commits":328,"total_committers":3,"mean_commits":"109.33333333333333","dds":0.03658536585365857,"last_synced_commit":"9a22a07539a3a66b77084efba922da3c99a7f438"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/flingyp/flypeng-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flingyp%2Fflypeng-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flingyp%2Fflypeng-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flingyp%2Fflypeng-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flingyp%2Fflypeng-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flingyp","download_url":"https://codeload.github.com/flingyp/flypeng-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flingyp%2Fflypeng-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270796219,"owners_count":24647319,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["javascript","tool","typescript","util","vitepress","vitest"],"created_at":"2024-11-09T20:17:09.236Z","updated_at":"2025-08-17T01:33:36.793Z","avatar_url":"https://github.com/flingyp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @flypeng/tool\n\n\u003cimg alt=\"@flypeng/tool\" src=\"https://img.shields.io/npm/v/%40flypeng%2Ftool?style=plastic\u0026logo=npm\u0026label=%40flypeng%2Ftool\u0026link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40flypeng%2Ftool\"\u003e\n\n## ⛳ Introduction\n\n[@flypeng/tool](https://flingyp.github.io/flypeng-tool/) 是一个集成业务中常用的工具函数库。集成封装常用业务函数库，可以极大程度上的提高开发者的效率。\n\n搭建这么一个函数库的灵感来自于 [VueUse](https://vueuse.org/)，把每一个工具函数想象成为一个钩子函数去使用。目标就是集成所有常用的工具函数，并且可以轻松使用它。\n\n## 📦 Installation\n\n```bash\nnpm install @flypeng/tool@latest\n\nyarn add @flypeng/tool@latest\n\npnpm add @flypeng/tool@latest\n```\n\n## 📚 Usage\n\n### `@flypeng/tool/browser`\n\n集成所有非 `Node Functions` 环境下的工具函数\n\n```ts\nimport { useRandomInteger, useIsMobile } from '@flypeng/tool/browser';\n\nconst randomInteger = useRandomInteger(10, 100); // Integer in [10, 100]\n```\n\n### `@flypeng/tool/node`\n\n集成 Node 环境下的工具函数\n\n```ts\nimport { useGetCurrentPath, useIsFile } from '@flypeng/tool/node';\n\nconst isFile = useIsFile(useGetCurrentPath()); // isFile is Boolean\n```\n\n## ⛏️ Typescript\n\n使用 Typescript 开发时，由于 `@flypeng/tool` 构建设计问题，需要在 `tsconfig.json` 文件中重新指定对应模块包 `browser`、`node` 的类型声明文件路径\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"@flypeng/tool/browser\": [\"node_modules/@flypeng/tool/dist/browser\"],\n      \"@flypeng/tool/node\": [\"node_modules/@flypeng/tool/dist/node\"]\n    }\n  }\n}\n```\n\n## License\n\n[MIT](./LICENSE) License © 2022 [FlingYP](https://github.com/flingyp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflingyp%2Fflypeng-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflingyp%2Fflypeng-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflingyp%2Fflypeng-tool/lists"}