{"id":13772707,"url":"https://github.com/giogonzo/fast-check-io-ts","last_synced_at":"2025-03-16T21:30:26.705Z","repository":{"id":47450159,"uuid":"200862419","full_name":"giogonzo/fast-check-io-ts","owner":"giogonzo","description":"io-ts codec to fast-check arbitrary mapping","archived":false,"fork":false,"pushed_at":"2021-08-31T10:21:14.000Z","size":15,"stargazers_count":32,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T12:01:57.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/giogonzo.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}},"created_at":"2019-08-06T13:58:22.000Z","updated_at":"2024-05-21T13:25:13.000Z","dependencies_parsed_at":"2022-09-26T18:20:48.108Z","dependency_job_id":null,"html_url":"https://github.com/giogonzo/fast-check-io-ts","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giogonzo%2Ffast-check-io-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giogonzo%2Ffast-check-io-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giogonzo%2Ffast-check-io-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giogonzo%2Ffast-check-io-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giogonzo","download_url":"https://codeload.github.com/giogonzo/fast-check-io-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830915,"owners_count":20354850,"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-08-03T17:01:07.079Z","updated_at":"2025-03-16T21:30:26.412Z","avatar_url":"https://github.com/giogonzo.png","language":"TypeScript","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"# fast-check-io-ts\n\n[io-ts](https://github.com/gcanti/io-ts) codecs mapped to [fast-check](https://github.com/dubzzz/fast-check) arbitraries.\n\n## Usage\n\n```ts\nimport * as fc from 'fast-check';\nimport * as t from 'io-ts';\nimport { getArbitrary } from 'fast-check-io-ts';\n\nconst NonEmptyString = t.brand(\n  t.string,\n  (s): s is t.Branded\u003cstring, { readonly NonEmptyString: symbol }\u003e =\u003e s.length \u003e 0,\n  'NonEmptyString'\n);\nconst User = t.type({\n  name: t.string,\n  status: t.union([t.literal('active'), t.literal('inactive')]),\n  handle: NonEmptyString\n});\n\nconst userArb = getArbitrary(User);\n\nconsole.log(fc.sample(userArb, 1)[0]); // { name: '', status: 'inactive', handle: 'M.y?\u003eA/' }\n```\n\n## Known issues\n\n- only supports predefined `io-ts` codecs, not custom types e.g. `DateFromISOString` from `io-ts-types`\n- `getArbitrary(t.keyof({ ... }))` is currently marked as error by TS, even though the codec is supported in the implementation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiogonzo%2Ffast-check-io-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiogonzo%2Ffast-check-io-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiogonzo%2Ffast-check-io-ts/lists"}