{"id":13496484,"url":"https://github.com/nvie/decoders","last_synced_at":"2026-03-06T15:00:43.147Z","repository":{"id":25752239,"uuid":"105810428","full_name":"nvie/decoders","owner":"nvie","description":"Elegant validation library for type-safe input data for TypeScript","archived":false,"fork":false,"pushed_at":"2026-03-01T21:41:16.000Z","size":48428,"stargazers_count":395,"open_issues_count":5,"forks_count":28,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-01T21:48:34.650Z","etag":null,"topics":["checking","composition","decoders","elm","flow","input","javascript","type","typescript","validation"],"latest_commit_sha":null,"homepage":"https://decoders.cc","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/nvie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["nvie"]}},"created_at":"2017-10-04T19:40:11.000Z","updated_at":"2026-03-01T21:41:19.000Z","dependencies_parsed_at":"2024-06-18T13:49:40.240Z","dependency_job_id":"abcf73b5-c90c-415a-9d1e-01f363b277c7","html_url":"https://github.com/nvie/decoders","commit_stats":{"total_commits":1468,"total_committers":17,"mean_commits":86.3529411764706,"dds":"0.23978201634877383","last_synced_commit":"4f559619f4e8e51737d37510d3eb573365e31a1a"},"previous_names":[],"tags_count":134,"template":false,"template_full_name":null,"purl":"pkg:github/nvie/decoders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvie%2Fdecoders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvie%2Fdecoders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvie%2Fdecoders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvie%2Fdecoders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nvie","download_url":"https://codeload.github.com/nvie/decoders/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvie%2Fdecoders/sbom","scorecard":{"id":699252,"data":{"date":"2025-08-11","repo":{"name":"github.com/nvie/decoders","commit":"c1c1fffd2f3eb8d58106f312468ed339897a94d0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"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":"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":7,"reason":"8 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 7","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":"Code-Review","score":0,"reason":"Found 1/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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/continuous-releases.yml:1","Warn: no topLevel permission defined: .github/workflows/test.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":"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":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-releases.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/nvie/decoders/continuous-releases.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-releases.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/nvie/decoders/continuous-releases.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/nvie/decoders/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/nvie/decoders/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/nvie/decoders/test.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/continuous-releases.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:40","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned","Info:   1 out of   2 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":"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":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: TypeScriptPropertyBasedTesting integration found: test/strings.test.ts:1","Info: TypeScriptPropertyBasedTesting integration found: test/unions.test.ts:1","Info: TypeScriptPropertyBasedTesting integration found: test/strings.test.ts:1","Info: TypeScriptPropertyBasedTesting integration found: test/unions.test.ts:1"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"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 4 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"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-cxrh-j4jr-qwg3","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T04:45:21.263Z","repository_id":25752239,"created_at":"2025-08-22T04:45:21.264Z","updated_at":"2025-08-22T04:45:21.264Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30021800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T21:50:36.781Z","status":"ssl_error","status_checked_at":"2026-03-02T21:50:28.329Z","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":["checking","composition","decoders","elm","flow","input","javascript","type","typescript","validation"],"created_at":"2024-07-31T19:01:48.794Z","updated_at":"2026-03-06T15:00:43.141Z","avatar_url":"https://github.com/nvie.png","language":"TypeScript","readme":"\u003cimg alt=\"Decoders logo\" src=\"./assets/logo@2x.png\" style=\"width: 100%; max-width: 830px; max-height: 248px\" width=\"830\" /\u003e\u003cbr /\u003e\n\n[![npm](https://img.shields.io/npm/v/decoders.svg)](https://www.npmjs.com/package/decoders)\n[![Test Status](https://github.com/nvie/decoders/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/nvie/decoders/actions)\n[![Bundle size for decoders](https://pkg-size.dev/badge/bundle/4200)](https://pkg-size.dev/decoders)\n\nElegant and battle-tested validation library for type-safe input data for TypeScript.\n\n## Basic example\n\n```typescript\nimport { array, isoDate, number, object, optional, string } from 'decoders';\n\n// Incoming data at runtime, e.g. the request body\n// The point is that this data is untrusted and its type unknown\nconst externalData = {\n  id: 123,\n  name: 'Alison Roberts',\n  createdAt: '2026-01-11T12:26:37.024Z',\n  tags: ['foo', 'bar'],\n};\n\n// Write the decoder (= what you expect the data to look like)\nconst userDecoder = object({\n  id: number,\n  name: string,\n  createdAt: optional(isoDate),\n  tags: array(string),\n});\n\n// Call .verify() on the incoming data\nconst user = userDecoder.verify(externalData);\n//    ^^^^\n//    TypeScript will infer this type as:\n//    {\n//      id: number;\n//      name: string;\n//      createdAt?: Date;\n//      tags: string[];\n//    }\n```\n\n## Installation\n\n```bash\nnpm install decoders\n```\n\n## Requirements\n\nYou must set `strict: true` in your `tsconfig.json` in order for type inference to work\ncorrectly!\n\n```js\n// tsconfig.json\n{\n  \"compilerOptions\": {\n    \"strict\": true\n  }\n}\n```\n\n## Documentation\n\nDocumentation can be found on [decoders.cc](https://decoders.cc).\n\nThere is a dedicated page that explains how to\n[build your own decoders](https://decoders.cc/docs/building-your-own).\n","funding_links":["https://github.com/sponsors/nvie"],"categories":["TypeScript","JavaScript","Packages / Helpers"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvie%2Fdecoders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvie%2Fdecoders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvie%2Fdecoders/lists"}