{"id":36370447,"url":"https://github.com/mattecapu/typs","last_synced_at":"2026-01-11T14:00:18.171Z","repository":{"id":23044695,"uuid":"26397729","full_name":"mattecapu/typs","owner":"mattecapu","description":"An handy library for type validation in Javascript","archived":false,"fork":false,"pushed_at":"2016-09-06T06:21:40.000Z","size":54,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T05:27:55.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"atom/underscore-plus","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattecapu.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":"2014-11-09T14:15:39.000Z","updated_at":"2016-03-29T09:50:48.000Z","dependencies_parsed_at":"2022-08-21T09:40:52.949Z","dependency_job_id":null,"html_url":"https://github.com/mattecapu/typs","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/mattecapu/typs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattecapu%2Ftyps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattecapu%2Ftyps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattecapu%2Ftyps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattecapu%2Ftyps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattecapu","download_url":"https://codeload.github.com/mattecapu/typs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattecapu%2Ftyps/sbom","scorecard":{"id":626112,"data":{"date":"2025-08-11","repo":{"name":"github.com/mattecapu/typs","commit":"005f5066553ad70eeddb2a0beae11afd88184fa0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-21T06:30:10.390Z","repository_id":23044695,"created_at":"2025-08-21T06:30:10.390Z","updated_at":"2025-08-21T06:30:10.390Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28306983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T11:18:18.743Z","status":"ssl_error","status_checked_at":"2026-01-11T11:07:56.842Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2026-01-11T14:00:15.480Z","updated_at":"2026-01-11T14:00:18.107Z","avatar_url":"https://github.com/mattecapu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# typs\n\nAn handy library for type validation in Javascript\n\nJust\n\n```\nnpm install typs --save\n```\n\nit.\n\nThe library is still widely open to changes, so feel free to propose new features or open an issue.\n\n## What can I use it for?\n\n### Param checking\n\nWrite a sound REST API or provide strong code constraints validating your parameters\n\n```js\napp.get('/api/v1/users/:user_id', (req) =\u003e {\n\tvar user_id = req.params.user_id;\n\tif(typs(user_id).integer().positive().notZero()) {\n\t\tthrow new Error('user_id is not a valid identifier');\n\t}\n\t// ...\n});\n```\n\n### Input validation\n\nLet typs handle your validation logic in an easy and semantic way\n\n```js\nconst usernameType = typs().string().notEmpty().len({min: 5, max: 15});\nconst uniqueUsernameType = usernameType.satisifies((username) =\u003e\n\t// yes, typs supports promises!\n\tquery('SELECT * FROM users WHERE username = ?', username)\n\t\t.then((rows) =\u003e rows.length \u003c 1);\n);\nconst passwordType = typs().string().notEmpty().len({min: 8, max: 25});\nconst emailType = typs().string().notEmpty().regex(/* ...a long mail regex... */);\n\nfunction add_user(username, password, email) {\n\tif(typs(username).isnt(usernameType)) {\n\t\tthrow new Error('the username you provided is not a valid username')\n\t}\n\tif(typs(password).isnt(passwordType)) {\n\t\tthrow new Error('the password you provided is not valid');\n\t}\n\tif(typs(email).isnt(emailType)) {\n\t\tthrow new Error('the e-mail you provided is not valid');\n\t}\n\n\ttyps(username).isnt(uniqueUsernameType).then((pass) =\u003e {\n\t\tif (!pass) throw new Error('this username already exists, please pick another');\n\t\t// ...\n\t});\n}\n```\n\n## License\n\nTyps comes with a good, ol' [MIT license](https://github.com/mattecapu/typs/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattecapu%2Ftyps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattecapu%2Ftyps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattecapu%2Ftyps/lists"}