{"id":15355803,"url":"https://github.com/fibo/minimal-type-guard-helpers","last_synced_at":"2025-08-23T12:32:13.260Z","repository":{"id":195321096,"uuid":"692745207","full_name":"fibo/minimal-type-guard-helpers","owner":"fibo","description":"minimal type-guard helpers","archived":false,"fork":false,"pushed_at":"2023-10-14T21:59:59.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T10:53:58.495Z","etag":null,"topics":["helpers","minimal","type-guards"],"latest_commit_sha":null,"homepage":"https://npm.im/minimal-type-guard-helpers","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/fibo.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,"zenodo":null}},"created_at":"2023-09-17T13:07:46.000Z","updated_at":"2024-05-09T10:05:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"e31d20d9-15dc-4015-a975-d368bbfeeb30","html_url":"https://github.com/fibo/minimal-type-guard-helpers","commit_stats":null,"previous_names":["fibo/minimal-type-guard-helpers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fibo/minimal-type-guard-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fminimal-type-guard-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fminimal-type-guard-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fminimal-type-guard-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fminimal-type-guard-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fibo","download_url":"https://codeload.github.com/fibo/minimal-type-guard-helpers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fminimal-type-guard-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271747023,"owners_count":24813604,"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-23T02:00:09.327Z","response_time":69,"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":["helpers","minimal","type-guards"],"created_at":"2024-10-01T12:25:42.057Z","updated_at":"2025-08-23T12:32:13.222Z","avatar_url":"https://github.com/fibo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minimal-type-guard-helpers\n\n\u003e provides few helpers to create _type guards_\n\nThis package is implemented with ECMAScript modules. CommonJS is not supported.\n\n## Synopsis\n\n```ts\nimport {\n  arrayTypeGuard,\n  isLiteralType,\n  isMaybeObject,\n  objectTypeGuard\n} from \"minimal-type-guard-helpers\"\n\nexport const myItems = [\"foo\", \"bar\"] as const\nexport type MyItem = (typeof myItems)[number]\nexport const isMyItem = isLiteralType\u003cMyItem\u003e(myItems)\n\ntype MyItems = MyItem[]\nconst isMyItems = arrayTypeGuard\u003cMyItem\u003e(isMyItem)\n\ntype Foo = { bar: boolean }\n\nconst getBar = (arg: unknown): Foo[\"bar\"] | undefined =\u003e {\n  if (isMaybeObject\u003cFoo\u003e(arg)) return arg.bar\n}\n\nconst isFoo = objectTypeGuard\u003cFoo\u003e(({ bar }) =\u003e {\n  return typeof bar === \"boolean\"\n})\n```\n\n## License\n\n[MIT](https://fibo.github.io/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibo%2Fminimal-type-guard-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffibo%2Fminimal-type-guard-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibo%2Fminimal-type-guard-helpers/lists"}