{"id":26849306,"url":"https://github.com/libanvl/opt","last_synced_at":"2026-02-24T20:42:03.727Z","repository":{"id":230498192,"uuid":"427754889","full_name":"libanvl/opt","owner":"libanvl","description":"A null-free optional value library for .NET","archived":false,"fork":false,"pushed_at":"2025-03-24T20:44:56.000Z","size":147,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T01:59:04.759Z","etag":null,"topics":["dotnet","none","nuget-package","null-safety","option","optional","some"],"latest_commit_sha":null,"homepage":"https://libanvl.github.io/opt/","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/libanvl.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,"zenodo":null}},"created_at":"2021-11-13T19:29:23.000Z","updated_at":"2025-02-24T00:34:30.000Z","dependencies_parsed_at":"2024-12-07T02:23:27.349Z","dependency_job_id":"51e31b87-9a1c-4823-9556-7c2e25bab400","html_url":"https://github.com/libanvl/opt","commit_stats":null,"previous_names":["libanvl/opt"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libanvl%2Fopt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libanvl%2Fopt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libanvl%2Fopt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libanvl%2Fopt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libanvl","download_url":"https://codeload.github.com/libanvl/opt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252310935,"owners_count":21727512,"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":["dotnet","none","nuget-package","null-safety","option","optional","some"],"created_at":"2025-03-30T21:33:02.692Z","updated_at":"2026-02-24T20:42:03.697Z","avatar_url":"https://github.com/libanvl.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/libanvl/opt/actions/workflows/libanvl-dotnet-ci.yml/badge.svg?branch=main)](https://github.com/libanvl/opt/actions/workflows/libanvl-dotnet-ci.yml)\n[![CodeQL](https://github.com/libanvl/opt/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/libanvl/opt/actions/workflows/github-code-scanning/codeql)\n[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/libanvl.opt?label=libanvl.opt)](https://www.nuget.org/packages/libanvl.opt/)\n[![codecov](https://codecov.io/gh/libanvl/opt/graph/badge.svg?token=X29VU1I53I)](https://codecov.io/gh/libanvl/opt)\n\n# libanvl.Opt\n\nA null-free optional value library for .NET with an emphasis on minimizing additional allocations.\n\n* An optional value is represented as the struct Opt\u0026lt;T\u0026gt;\n* A possible value or error is represented as the struct Result\u0026lt;T, E\u0026gt;\n* A zero to N values are represented as the struct Any\u0026lt;T\u0026gt;\n\nSee the [Examples Tests](test/libanvl.Opt.Test/Examples.cs) for more on how to use Opt.\n\n## Requirements\n\n[.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0)\n\n## Releases\n\n* NuGet packages are available on [NuGet.org](https://www.nuget.org/packages/libanvl.opt)\n  * Embedded debug symbols\n  * Source Link enabled\n* NuGet packages from CI builds are available on the [libanvl GitHub feed](https://github.com/libanvl/opt/packages/)\n\n## libanvl.Opt Features\n\n- [X] Immutable\n- [X] Use Opt\u0026lt;T\u0026gt; instead of T? for optional values \n- [X] Implicit conversion from T to Opt\u0026lt;T\u0026gt;\n- [X] Deep selection of properties in complex objects\n- [X] SomeOrDefault() for any type\n- [X] Explicitly opt-in to exceptions with Unwrap()\n- [X] Cast inner value to compatible type with Cast\u0026lt;U\u0026gt;() \n- [ ] Opts of IEnumerable\u0026lt;T\u0026gt; are iterable\n\n## libanvl.Result Features\n\n- [X] Create success results with Result.Ok\n- [X] Create error results with Result.Err\n- [X] Unwrap values with Unwrap, throwing if the result is an error\n- [X] Match on success or error with Match\n- [X] Convert between Opt and Result\n\n## libanvl.OneOrMany Features\n\n- [X] OneOrMany\u0026lt;T\u0026gt; for a single value or a collection of values\n- [X] Implicit conversions\n- [X] Equality operators\n\n## libanvl.Any Features\n\n- [X] Any\u0026lt;T\u0026gt; for a single value or multiple values\n- [X] Implicit conversions\n- [X] Equality operators\n- [X] Add and remove elements\n- [X] Convert to array, list, or enumerable\n- [X] Convert to Opt\u0026lt;T\u0026gt;\n- [X] Cast elements to a compatible type\n\n## libanvl.AnyMap Features\n\n- [X] Dictionary-like collection that maps keys to values of type Any\u0026lt;V\u0026gt;\n- [X] Implements IAnyRefMap\u0026lt;K, V\u0026gt; for reference-based operations\n- [X] Get or add value by reference with GetOrAddValueRef\n- [X] Get value by reference with GetValueRef\n- [X] Try to get value by reference with TryGetValueRef\n- [X] Perform actions on each reference with ForEachRef\n- [X] Enumerate references with GetEnumerator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibanvl%2Fopt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibanvl%2Fopt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibanvl%2Fopt/lists"}