{"id":19793584,"url":"https://github.com/darky/dtypecheck","last_synced_at":"2025-07-18T14:41:12.575Z","repository":{"id":57216888,"uuid":"96620035","full_name":"darky/dtypecheck","owner":"darky","description":"Dynamic typecheck helper","archived":false,"fork":false,"pushed_at":"2017-11-09T17:17:27.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T20:47:19.269Z","etag":null,"topics":["dynamic","typecheck"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/darky.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}},"created_at":"2017-07-08T13:15:56.000Z","updated_at":"2017-11-09T14:38:05.000Z","dependencies_parsed_at":"2022-08-28T21:40:18.064Z","dependency_job_id":null,"html_url":"https://github.com/darky/dtypecheck","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darky%2Fdtypecheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darky%2Fdtypecheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darky%2Fdtypecheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darky%2Fdtypecheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darky","download_url":"https://codeload.github.com/darky/dtypecheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241133152,"owners_count":19915348,"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":["dynamic","typecheck"],"created_at":"2024-11-12T07:10:28.182Z","updated_at":"2025-02-28T09:50:11.332Z","avatar_url":"https://github.com/darky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dtypecheck - dynamic typecheck helper\n\n#### Note: It works with `env NODE_ENV=development`\n\nExamples:\n\n### Simple\n\n```javascript\nconst t = require(\"dtypecheck\");\nconst {expect} = require(\"chai\");\n\nconst fn = t(\n  number =\u003e `${number}`,\n  number =\u003e expect(number).a(`number`),\n  string =\u003e expect(string).a(`string`)\n);\n\nfn(1) // Good\nfn([1, 2]) // Bad\n```\n### Async\n\n```javascript\nconst t = require(\"dtypecheck\");\nconst {expect} = require(\"chai\");\n\nconst fn = t(\n  async (number) =\u003e `${number}`,\n  async (number) =\u003e expect(number).a(`number`),\n  async (string) =\u003e expect(string).a(`string`)\n);\n\n(async () {\n  await fn(1) // Good\n  await fn([1, 2]) // Bad\n})();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarky%2Fdtypecheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarky%2Fdtypecheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarky%2Fdtypecheck/lists"}