{"id":25019862,"url":"https://github.com/kei-g/truth","last_synced_at":"2025-08-10T08:10:06.286Z","repository":{"id":103255585,"uuid":"154922955","full_name":"kei-g/truth","owner":"kei-g","description":"No conditional branch","archived":false,"fork":false,"pushed_at":"2021-07-07T15:11:52.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T10:12:07.310Z","etag":null,"topics":["cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kei-g.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-27T03:42:26.000Z","updated_at":"2021-07-07T15:11:54.000Z","dependencies_parsed_at":"2023-04-26T22:47:16.325Z","dependency_job_id":null,"html_url":"https://github.com/kei-g/truth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kei-g/truth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kei-g%2Ftruth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kei-g%2Ftruth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kei-g%2Ftruth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kei-g%2Ftruth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kei-g","download_url":"https://codeload.github.com/kei-g/truth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kei-g%2Ftruth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269693593,"owners_count":24460248,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cpp"],"created_at":"2025-02-05T11:51:46.539Z","updated_at":"2025-08-10T08:10:06.216Z","avatar_url":"https://github.com/kei-g.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `truth` - No conditional branch\n\nTo decrease cyclomatic complexity\n\n## Positive Case, Before\n\n```cpp\nif (expression) {\n        /* Something you want to do */\n}\n```\n\n## Positive Case, After\n\n```cpp\n#include \"truth.hpp\"\n\nalgorithm::when(expression, []() { /* Something you want to do */ });\n```\n\nor\n\n## Negative Case, Before\n\n```cpp\nif (!expression) {\n        /* Something you want to do */\n}\n```\n\n## Negative Case, After\n\n```cpp\n#include \"truth.hpp\"\n\nalgorithm::unless(expession, []() { /* Something you want to do */ });\n```\n\n[![License](https://img.shields.io/github/license/kei-g/truth?style=plastic)](https://opensource.org/licenses/BSD-3-Clause)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkei-g%2Ftruth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkei-g%2Ftruth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkei-g%2Ftruth/lists"}