{"id":15926788,"url":"https://github.com/zemse/deno-type-check","last_synced_at":"2025-08-20T00:12:37.598Z","repository":{"id":119196307,"uuid":"265957098","full_name":"zemse/deno-type-check","owner":"zemse","description":"Runtime type check library for Deno","archived":false,"fork":false,"pushed_at":"2020-05-24T12:17:03.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T02:32:10.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/zemse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2020-05-21T21:39:28.000Z","updated_at":"2020-05-24T12:17:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e763a46-3da8-4334-ab73-a03cab1341a1","html_url":"https://github.com/zemse/deno-type-check","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fdeno-type-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fdeno-type-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fdeno-type-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fdeno-type-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zemse","download_url":"https://codeload.github.com/zemse/deno-type-check/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247010198,"owners_count":20868671,"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-10-06T22:42:03.776Z","updated_at":"2025-04-03T13:34:28.570Z","avatar_url":"https://github.com/zemse.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# type_check\n\nRuntime type check library for Deno\n\n```typescript\nimport { t, validate, check } from 'https://deno.land/x/type_check/mod.ts';\n\nfunction submitAge(age: number): void {\n  // Throws if not a unsigned integer (non-negative)\n  validate(age, t.uint);\n\n  // OR To receive a boolean\n  if (check(age, t.uint)) {\n  }\n}\n\nfunction fetchTransactionAmount(hash: string): number {\n  // Throws if not a 32 byte hex string\n  validate(hash, t.hex32);\n\n  // OR To receive a boolean\n  if (check(hash, t.hex32)) {\n  }\n}\n\n// To work with optional multiple types\nfunction enterAmount(input: number | string) {\n  // Throws if all the type checks fail\n  validateMultiple(input, [t.number, t.hex]);\n}\n```\n\n## Type Checkers Available\n\n### String\n\n- string\n- hex\n- hex20\n- hex32\n- hex65\n\n### Nubmer\n\n- number\n- int\n- uint\n- uint8\n\n### Objects\n\n- array\n- uint8array\n- functionObject\n- object\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fdeno-type-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzemse%2Fdeno-type-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fdeno-type-check/lists"}