{"id":20098574,"url":"https://github.com/dishait/m-type-tools","last_synced_at":"2025-10-29T00:02:00.771Z","repository":{"id":64489361,"uuid":"496504870","full_name":"dishait/m-type-tools","owner":"dishait","description":"通用 ts 的类型工具","archived":false,"fork":false,"pushed_at":"2024-02-28T04:03:47.000Z","size":102,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T09:11:25.520Z","etag":null,"topics":["deno","easy","helper","shared","typescript"],"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/dishait.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-05-26T06:20:10.000Z","updated_at":"2023-03-20T17:47:02.000Z","dependencies_parsed_at":"2024-06-18T20:04:15.234Z","dependency_job_id":"310a56d3-d300-43c3-8feb-b46784ca249b","html_url":"https://github.com/dishait/m-type-tools","commit_stats":{"total_commits":47,"total_committers":1,"mean_commits":47.0,"dds":0.0,"last_synced_commit":"d94d29e271ec5f780d729e70424c6c79c2337dcd"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dishait%2Fm-type-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dishait%2Fm-type-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dishait%2Fm-type-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dishait%2Fm-type-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dishait","download_url":"https://codeload.github.com/dishait/m-type-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252629285,"owners_count":21779185,"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":["deno","easy","helper","shared","typescript"],"created_at":"2024-11-13T17:05:57.361Z","updated_at":"2025-10-29T00:02:00.664Z","avatar_url":"https://github.com/dishait.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# m-type-tools\n\n通用 `ts` 的类型工具\n\n\u003cbr /\u003e\n\n## 使用\n\n### 安装\n\n```shell\npnpm i m-type-tools\n```\n\n\u003cbr /\u003e\n\n### 类型判断\n\n```ts\nimport { isString } from 'm-type-tools'\n\nisString('foo') // true\n\nisString(1) // false\n\nlet bar: any = 'bar'\n\nif (isString(bar)) {\n\tbar.toLowerCase() // 类型正确的\n}\n```\n\n\u003cbr /\u003e\n\n### 获取类型\n\n```ts\nimport type { UnArray } from 'm-type-tools'\n\ntype Foo = UnArray\u003cnumber[]\u003e // number\n\ntype Bar = UnArray\u003cstring[]\u003e // string\n```\n\n更多的类型工具可见 👉 [源码](./src)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## `Deno` 支持\n\n由 [udeno](https://github.com/dishait/udeno) 提供开箱支持\n\n```ts\nimport { isString } from 'https://deno.land/x/mtype@v0.2.9/mod.ts'\n```\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## 组织 🦔\n\n欢迎关注 **帝莎编程**\n\n- [官网](http://dishaxy.dishait.cn/)\n- [Gitee](https://gitee.com/dishait)\n- [Github](https://github.com/dishait)\n- [网易云课堂](https://study.163.com/provider/480000001892585/index.htm?share=2\u0026shareId=480000001892585)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## License\n\nMade with [markthree](https://github.com/markthree)\n\nPublished under [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdishait%2Fm-type-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdishait%2Fm-type-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdishait%2Fm-type-tools/lists"}