{"id":19133994,"url":"https://github.com/umbrellio/typecheck","last_synced_at":"2026-02-19T12:31:35.292Z","repository":{"id":35104730,"uuid":"207281700","full_name":"umbrellio/typecheck","owner":"umbrellio","description":"Strict, declarative, extensible runtime type checker for JavaScript","archived":false,"fork":false,"pushed_at":"2023-08-04T16:43:37.000Z","size":93,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-27T00:52:13.624Z","etag":null,"topics":["check","type","type-check","type-checker","typecheck"],"latest_commit_sha":null,"homepage":"https://npm.im/@umbrellio/typecheck","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/umbrellio.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}},"created_at":"2019-09-09T10:15:11.000Z","updated_at":"2023-09-23T15:11:42.000Z","dependencies_parsed_at":"2024-11-09T06:36:53.946Z","dependency_job_id":null,"html_url":"https://github.com/umbrellio/typecheck","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/umbrellio/typecheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umbrellio%2Ftypecheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umbrellio%2Ftypecheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umbrellio%2Ftypecheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umbrellio%2Ftypecheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umbrellio","download_url":"https://codeload.github.com/umbrellio/typecheck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umbrellio%2Ftypecheck/sbom","scorecard":{"id":908433,"data":{"date":"2025-08-11","repo":{"name":"github.com/umbrellio/typecheck","commit":"410499182b460d49e874dbef0641d1fcab7e1807"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Code-Review","score":1,"reason":"Found 1/9 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/umbrellio/typecheck/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/umbrellio/typecheck/main.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:22","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T18:15:17.000Z","repository_id":35104730,"created_at":"2025-08-24T18:15:17.000Z","updated_at":"2025-08-24T18:15:17.000Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29613120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["check","type","type-check","type-checker","typecheck"],"created_at":"2024-11-09T06:24:40.569Z","updated_at":"2026-02-19T12:31:35.242Z","avatar_url":"https://github.com/umbrellio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# typecheck\n\nSimple, strict, extensible runtime type checker for JavaScript.\n\n## Basic usage\n\n```javascript\nimport T from '@umbrellio/typecheck'\n\n// define a type\nconst userType = T.Struct({\n  email: T.String,\n  password: T.String,\n  age: T.Option(T.Number),\n  role: T.Sum('admin', 'support'),\n})\n\n// run a type check\nT.check(userType, {\n  email: 'cow@cow.cow',\n  password: '12345',\n  age: 12,\n  role: 'admin',\n}) // =\u003e true\n```\n\n## Installation\n\nInstall with yarn:\n\n```sh\n$ yarn add @umbrellio/typecheck\n# or with npm:\n$ npm i -S @umbrellio/typecheck\n```\n\n## Built-in type reference\n\n### Primitive types\n\n- T.String: `kek`, `new String('pek')`\n- T.Number: `69`, `new Number(100)`, `-2131.31`\n- T.Boolean: `true`, `false`\n\n### Arrays\n\nSignature: `T.Array(type)`\n\n```javascript\nT.Array(T.String) // [], ['kek', 'pek']\nT.Array(T.Sum(T.Boolean, T.Number)) // [], [true, 1]\n```\n\n### Option\n\nSignature: `T.Option(type)`\n\n```javascript\nT.Option(T.String) // null, undefined, 'some string'\nT.Option(T.Array(T.Number)) // null, undefined, [], [69]\n```\n\n### Struct\n\nSignature: `T.Struct(schema)` where `schema` is an object\n\n```javascript\nT.Struct({ name: T.String }) // { name: 'Ivan' }\nT.Struct({ email: T.String, age: T.Option(T.Number) }) // { email: 'ivan@ivan.ru', age: 69 }\n```\n\n### Sum\n\nSignature: `T.Sum(...types)`\n\n```javascript\nT.Sum(T.Number, T.String, T.Struct({ name: T.String })) // 69, '69', { name: 'ivan' }\n```\n\n## Advanced usage\n\n### Custom types\n\n```javascript\nimport T from '@umbrellio/typecheck'\n\n// age is a positive number\nconst Age = new T.Type(v =\u003e T.check(T.Number, v) \u0026\u0026 v \u003e 0)\n\nconst userType = T.Struct({\n  email: T.String,\n  age: T.Option(Age),\n})\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/umbrellio/typecheck.\n\n## License\n\nReleased under MIT License.\n\n## Authors\n\nCreated by Alexander Komarov.\n\n\u003ca href=\"https://github.com/umbrellio/\"\u003e\n\u003cimg style=\"float: left;\" src=\"https://umbrellio.github.io/Umbrellio/supported_by_umbrellio.svg\" alt=\"Supported by Umbrellio\" width=\"439\" height=\"72\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumbrellio%2Ftypecheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumbrellio%2Ftypecheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumbrellio%2Ftypecheck/lists"}