{"id":13724118,"url":"https://github.com/mingrammer/tyfy","last_synced_at":"2025-04-22T16:31:09.279Z","repository":{"id":57609841,"uuid":"187323246","full_name":"mingrammer/tyfy","owner":"mingrammer","description":"Truthy and falsy text validators","archived":false,"fork":false,"pushed_at":"2019-05-18T06:49:41.000Z","size":4,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-04T01:23:47.372Z","etag":null,"topics":["falsy","truthy","validator"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/mingrammer.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":"2019-05-18T06:35:32.000Z","updated_at":"2021-08-20T14:11:58.000Z","dependencies_parsed_at":"2022-08-27T21:23:33.533Z","dependency_job_id":null,"html_url":"https://github.com/mingrammer/tyfy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingrammer%2Ftyfy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingrammer%2Ftyfy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingrammer%2Ftyfy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingrammer%2Ftyfy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mingrammer","download_url":"https://codeload.github.com/mingrammer/tyfy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223900316,"owners_count":17222028,"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":["falsy","truthy","validator"],"created_at":"2024-08-03T01:01:50.550Z","updated_at":"2024-11-10T00:40:30.994Z","avatar_url":"https://github.com/mingrammer.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cbr\u003e\u003cbr\u003e\n\n\u003ch1 align=\"center\"\u003eTyFy\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://godoc.org/github.com/mingrammer/tyfy\"\u003e\u003cimg src=\"https://godoc.org/github.com/mingrammer/tyfy?status.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/mingrammer/tyfy\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/mingrammer/tyfy\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/mingrammer/tyfy\"\u003e\u003cimg src=\"https://travis-ci.org/mingrammer/tyfy.svg?branch=master\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nTruthy and falsy text validators\n\u003c/p\u003e\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n\u003e A truthy value is a value that is considered true, and a falsy value is a value that is considered false.\n\ntyfy (short of \"truthy and falsy\") provides two simple validators for the **truthy** and **falsy** text values (string only). It is useful for some programs that accept the human-readable true/false value as input from users, for example, the command line tools with a prompt such as `(y/n)`.\n\nThe default values of the truthy and falsy are `\"1\", \"true\", \"t\", \"yes\", \"y\", \"ok\"` and `\"0\", \"false\", \"f\", \"no\", \"n\"`, respectively.\n\n## Installation\n\n```\ngo get github.com/mingrammer/tyfy\n```\n\n## Usage\n\n\u003e See details in [GoDoc](https://godoc.org/github.com/mingrammer/tyfy)\n\n```go\nIsTruthy(\"yes\")\nIsTruthy(\"no\")\n// true\n// false\n\nIsFalsy(\"n\")\nIsFalsy(\"y\")\n// true\n// false\n```\n\nYou can extend the set of values as needed.\n\n```go\nExtendTruthy([]string{\"o\"})\nExtendFalsy([]string{\"x\"})\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingrammer%2Ftyfy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmingrammer%2Ftyfy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingrammer%2Ftyfy/lists"}