{"id":22300054,"url":"https://github.com/misinformeddna/yellowcounter.nails","last_synced_at":"2025-03-25T23:21:06.469Z","repository":{"id":69906749,"uuid":"139897122","full_name":"MisinformedDNA/YellowCounter.Nails","owner":"MisinformedDNA","description":"A few Ruby and Rails-like extension methods for .NET","archived":false,"fork":false,"pushed_at":"2018-07-15T06:07:36.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T14:07:53.434Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","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/MisinformedDNA.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-07-05T20:29:25.000Z","updated_at":"2018-07-15T06:07:37.000Z","dependencies_parsed_at":"2023-03-05T18:00:40.363Z","dependency_job_id":null,"html_url":"https://github.com/MisinformedDNA/YellowCounter.Nails","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/MisinformedDNA%2FYellowCounter.Nails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisinformedDNA%2FYellowCounter.Nails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisinformedDNA%2FYellowCounter.Nails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisinformedDNA%2FYellowCounter.Nails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MisinformedDNA","download_url":"https://codeload.github.com/MisinformedDNA/YellowCounter.Nails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245557669,"owners_count":20635021,"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-12-03T18:08:56.456Z","updated_at":"2025-03-25T23:21:06.445Z","avatar_url":"https://github.com/MisinformedDNA.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NuGet](https://img.shields.io/nuget/v/YellowCounter.Nails.svg)](https://www.nuget.org/packages/YellowCounter.Nails/)\n\n# YellowCounter.Nails\nA few Ruby and Rails-like extension methods for .NET\n\nI always found it odd that when I wanted to know if a value _was_ entered, by the user, I had to ask if it _wasn't_ entered.\nNot only that, I had to ask if wasn't null and wasn't empty.\nAll I want to know is if the user provided a value!\nI'm sure there were similar reasons for why Ruby and Ruby on Rails felt then need to include these methods in their frameworks.\n\nThis library replicate 4 simple methods with simple abstractions.\nAs such, this library is very small and simple, but, IMO, the value lies in its simplicity.\n\n## IsNull()\n\nDetermines whether the instance is null.\n\n```csharp\nobject value = null;\nint? number = null;\n\nConsole.WriteLine(value == null);  // true \nConsole.WriteLine(value.IsNull()); // true \n\nConsole.WriteLine(number == null);  // true \nConsole.WriteLine(number.IsNull()); // true \n```\n\n## IsEmpty()\n\nDetermines whether the collection or string is empty. This is equivalent to testing the length of the collection or string for a value of zero.\n\n```csharp\nint[] array = new int[0];\nstring str = string.Empty;\n\nConsole.WriteLine(array.Length == 0); // true \nConsole.WriteLine(array.IsEmpty());   // true \n\nConsole.WriteLine(str.Length == 0); // true \nConsole.WriteLine(str.IsEmpty());   // true \n```\n\n## IsBlank()\n\nDetermines whether the instance is null, empty, whitespace or false.\n\n- On a collection, this is equivalent to `IsEmpty()`.\n- On a string, this is equivalent to `string.IsNullOrWhiteSpace()`.\n- On a bool, this is equivalent to comparing to `false`\n- On any other object, this is equivalent to `IsNull`\n\n## IsPresent()\n\nDetermines whether the instance is present. This is the opposite of `IsBlank()`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisinformeddna%2Fyellowcounter.nails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisinformeddna%2Fyellowcounter.nails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisinformeddna%2Fyellowcounter.nails/lists"}