{"id":42179758,"url":"https://github.com/neotoxic-off/yue","last_synced_at":"2026-01-26T22:01:28.743Z","repository":{"id":273669836,"uuid":"920031826","full_name":"Neotoxic-off/Yue","owner":"Neotoxic-off","description":"📚 Yue is a library made to simplify reading of .NET projects","archived":false,"fork":false,"pushed_at":"2025-01-22T08:47:09.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T09:33:27.958Z","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/Neotoxic-off.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":"2025-01-21T12:53:38.000Z","updated_at":"2025-01-22T08:47:12.000Z","dependencies_parsed_at":"2025-01-22T09:33:30.576Z","dependency_job_id":"6f64059a-8b54-4ee8-8bf4-d2574bb6966c","html_url":"https://github.com/Neotoxic-off/Yue","commit_stats":null,"previous_names":["neotoxic-off/yue"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Neotoxic-off/Yue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neotoxic-off%2FYue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neotoxic-off%2FYue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neotoxic-off%2FYue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neotoxic-off%2FYue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Neotoxic-off","download_url":"https://codeload.github.com/Neotoxic-off/Yue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neotoxic-off%2FYue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28789720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-26T22:00:39.541Z","updated_at":"2026-01-26T22:01:28.733Z","avatar_url":"https://github.com/Neotoxic-off.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yue\n📚 Yue is a library made to simplify lisibility reading of .NET projects\n\n1. [Yue Library Overview](#yue)\n2. [Namespace: `Yue`](#namespace-yue)\n3. [Available Methods](#available-methods)\n    1. [Or\u003cT\u003e(T value, params T[] options)](#1-ort-value-t-value-params-t-options)\n    2. [And(params Func\u003cbool\u003e[] conditions)](#2-andparams-funcbool-conditions)\n    3. [EqualsAny\u003cT\u003e(T value, params T[] options)](#3-equalsanyt-value-t-value-params-t-options)\n    4. [EqualsAll\u003cT\u003e(T value, params T[] options)](#4-equalsallt-value-t-value-params-t-options)\n    5. [Between(int value, int lower, int upper, bool inclusive = true)](#5-betweenint-value-int-lower-int-upper-bool-inclusive--true)\n    6. [InSet\u003cT\u003e(T value, IEnumerable\u003cT\u003e set)](#6-insett-value-t-value-ienumerablet-set)\n    7. [Not(bool condition)](#7-notbool-condition)\n    8. [InRange(int value, int lower, int upper, bool inclusive = true)](#8-inrangeint-value-int-lower-int-upper-bool-inclusive--true)\n    9. [AllMatch\u003cT\u003e(IEnumerable\u003cT\u003e values, Func\u003cT, bool\u003e condition)](#9-allmatcht-ienumerablet-values-funct-bool-condition)\n    10. [AnyMatch\u003cT\u003e(IEnumerable\u003cT\u003e values, Func\u003cT, bool\u003e condition)](#10-anymatcht-ienumerablet-values-funct-bool-condition)\n    11. [NoneMatch\u003cT\u003e(IEnumerable\u003cT\u003e values, Func\u003cT, bool\u003e condition)](#11-nonematcht-ienumerablet-values-funct-bool-condition)\n4. [Collections Utilities](#collections-utilities)\n    1. [Map\u003cTInput, TOutput\u003e(IEnumerable\u003cTInput\u003e collection, Func\u003cTInput, TOutput\u003e transform)](#maptinput-toutputienumerabletinput-collection-functinput-toutput-transform)\n    2. [Filter\u003cT\u003e(IEnumerable\u003cT\u003e collection, Func\u003cT, bool\u003e predicate)](#filtert-ienumerablet-collection-functbool-predicate)\n    3. [Reduce\u003cT, TAccumulate\u003e(IEnumerable\u003cT\u003e collection, Func\u003cTAccumulate, T, TAccumulate\u003e accumulator, TAccumulate initialValue)](#reducet-taccumulateienumerablet-collection-functaccumulatet-t-taccumulate-accumulator-taccumulate-initialvalue)\n    4. [Repeat(int times, Action action)](#repeatint-times-action-action)\n    5. [WhileTrue(Func\u003cbool\u003e condition, Action action)](#whiletruefunctbool-condition-action-action)\n    6. [Chunk\u003cT\u003e(IEnumerable\u003cT\u003e collection, int chunkSize)](#chunkt-ienumerablet-collection-int-chunksize)\n5. [Variables Utilities](#variables-utilities)\n    1. [Swap\u003cT\u003e(ref T x, ref T y)](#swapt-ref-t-x-ref-t-y)\n    2. [DefaultIfNull\u003cT\u003e(T variable, T defaultValue)](#defaultifnullt-t-variable-t-defaultvalue)\n    3. [Coalesce\u003cT\u003e(params T[] values)](#coalescet-t-params-t-values)\n    4. [LazyLoad\u003cT\u003e(Func\u003cT\u003e initializer)](#lazyloadt-funct-initializer)\n    5. [MinMax\u003cT\u003e(IEnumerable\u003cT\u003e collection)](#minmaxt-ienumerablet-collection)\n    6. [Clamp\u003cT\u003e(T value, T min, T max)](#clampt-t-value-t-min-t-max)\n    7. [Toggle(ref bool flag)](#toggleref-bool-flag)\n    8. [RoundToNearest(double value, double increment)](#roundtonearestdouble-value-double-increment)\n\nThe `Conditions` class in the `Yue` namespace provides the following logical functions:\n\n## Available Methods\n\n### 1. `Or\u003cT\u003e(T value, params T[] options)`\n\n**Usage**: Checks if the provided value is equal to any of the options.\n\n```csharp\nbool result = Conditions.Or(5, 1, 3, 5, 7); // Returns true because 5 is one of the options.\n```\n\n- **Parameters**:\n  - `value` (T): The value to compare.\n  - `options` (T[]): A list of options to compare against.\n  \n- **Returns**: \n  - `true` if the value matches any of the options, otherwise `false`.\n\n---\n\n### 2. `And(params Func\u003cbool\u003e[] conditions)`\n\n**Usage**: Checks if all provided conditions are `true`.\n\n```csharp\nbool result = Conditions.And(() =\u003e 5 \u003e 3, () =\u003e \"Hello\" == \"Hello\"); // Returns true.\n```\n\n- **Parameters**:\n  - `conditions`: An array of conditions represented by `Func\u003cbool\u003e` delegates.\n\n- **Returns**: \n  - `true` if all conditions evaluate to `true`, otherwise `false`.\n\n---\n\n### 3. `EqualsAny\u003cT\u003e(T value, params T[] options)`\n\n**Usage**: Checks if the provided value is equal to any of the options.\n\n```csharp\nbool result = Conditions.EqualsAny(10, 5, 10, 15); // Returns true because 10 is one of the options.\n```\n\n- **Parameters**:\n  - `value` (T): The value to check.\n  - `options` (T[]): A list of options to compare against.\n\n- **Returns**: \n  - `true` if the value is equal to any of the options, otherwise `false`.\n\n---\n\n### 4. `EqualsAll\u003cT\u003e(T value, params T[] options)`\n\n**Usage**: Checks if the provided value is equal to all of the options.\n\n```csharp\nbool result = Conditions.EqualsAll(10, 10, 10, 10); // Returns true because all options are equal to 10.\n```\n\n- **Parameters**:\n  - `value` (T): The value to compare against.\n  - `options` (T[]): A list of options to compare with.\n\n- **Returns**: \n  - `true` if the value is equal to all of the options, otherwise `false`.\n\n---\n\n### 5. `Between(int value, int lower, int upper, bool inclusive = true)`\n\n**Usage**: Determines whether a numeric value lies between two bounds.\n\n```csharp\nbool result = Conditions.Between(7, 5, 10); // Returns true because 7 is between 5 and 10.\nbool resultExclusive = Conditions.Between(5, 5, 10, false); // Returns false because the bound is exclusive.\n```\n\n- **Parameters**:\n  - `value` (int): The value to check.\n  - `lower` (int): The lower bound.\n  - `upper` (int): The upper bound.\n  - `inclusive` (bool, default = `true`): Determines whether the bounds are inclusive or exclusive.\n  \n- **Returns**: \n  - `true` if the value lies between the lower and upper bounds (inclusive or exclusive based on the `inclusive` parameter).\n\n---\n\n### 6. `InSet\u003cT\u003e(T value, IEnumerable\u003cT\u003e set)`\n\n**Usage**: Checks if a value is present within a given set of values.\n\n```csharp\nbool result = Conditions.InSet(5, new List\u003cint\u003e { 1, 2, 5, 8 }); // Returns true because 5 is in the set.\n```\n\n- **Parameters**:\n  - `value` (T): The value to check.\n  - `set` (IEnumerable\u003cT\u003e): The set to check if the value exists in.\n  \n- **Returns**: \n  - `true` if the value is in the set, otherwise `false`.\n\n---\n\n### 7. `Not(bool condition)`\n\n**Usage**: Performs a logical negation of a condition.\n\n```csharp\nbool result = Conditions.Not(true); // Returns false because the condition is negated.\n```\n\n- **Parameters**:\n  - `condition` (bool): The condition to negate.\n  \n- **Returns**: \n  - `true` if the condition is `false`, otherwise `false`.\n\n---\n\n### 8. `InRange(int value, int lower, int upper, bool inclusive = true)`\n\n**Usage**: Determines whether a numeric value falls within a specific range.\n\n```csharp\nbool result = Conditions.InRange(8, 5, 10); // Returns true because 8 is in the range 5 to 10.\n```\n\n- **Parameters**:\n  - `value` (int): The value to check.\n  - `lower` (int): The lower bound of the range.\n  - `upper` (int): The upper bound of the range.\n  - `inclusive` (bool, default = `true`): Determines whether the bounds are inclusive or exclusive.\n\n- **Returns**: \n  - `true` if the value falls within the range (inclusive or exclusive based on the `inclusive` parameter).\n\n---\n\n### 9. `AllMatch\u003cT\u003e(IEnumerable\u003cT\u003e values, Func\u003cT, bool\u003e condition)`\n\n**Usage**: Checks if all elements in a collection satisfy a given condition.\n\n```csharp\nbool result = Conditions.AllMatch(new List\u003cint\u003e { 1, 2, 3 }, v =\u003e v \u003e 0); // Returns true because all values are greater than 0.\n```\n\n- **Parameters**:\n  - `values` (IEnumerable\u003cT\u003e): The collection of values to check.\n  - `condition` (Func\u003cT, bool\u003e): The condition to apply to each element.\n\n- **Returns**: \n  - `true` if all elements satisfy the condition, otherwise `false`.\n\n---\n\n### 10. `AnyMatch\u003cT\u003e(IEnumerable\u003cT\u003e values, Func\u003cT, bool\u003e condition)`\n\n**Usage**: Checks if any element in a collection satisfies a given condition.\n\n```csharp\nbool result = Conditions.AnyMatch(new List\u003cint\u003e { 1, 2, 3 }, v =\u003e v == 2); // Returns true because 2 is in the collection.\n```\n\n- **Parameters**:\n  - `values` (IEnumerable\u003cT\u003e): The collection of values to check.\n  - `condition` (Func\u003cT, bool\u003e): The condition to apply to each element.\n\n- **Returns**: \n  - `true` if any element satisfies the condition, otherwise `false`.\n\n---\n\n### 11. `NoneMatch\u003cT\u003e(IEnumerable\u003cT\u003e values, Func\u003cT, bool\u003e condition)`\n\n**Usage**: Ensures that no element in a collection satisfies a given condition.\n\n```csharp\nbool result = Conditions.NoneMatch(new List\u003cint\u003e { 1, 2, 3 }, v =\u003e v == 5); // Returns true because no elements are equal to 5.\n```\n\n- **Parameters**:\n  - `values` (IEnumerable\u003cT\u003e): The collection of values to check.\n  - `condition` (Func\u003cT, bool\u003e): The condition to apply to each element.\n\n- **Returns**: \n  - `true` if no elements satisfy the condition, otherwise `false`.\n\n\n## Collections Utilities\n\n### `Map\u003cTInput, TOutput\u003e(IEnumerable\u003cTInput\u003e collection, Func\u003cTInput, TOutput\u003e transform)`\nTransforms each item in a collection using the provided function and returns a new collection.\n\n**Example usage:**\n```csharp\nvar numbers = new List\u003cint\u003e { 1, 2, 3, 4, 5 };\nvar doubled = Collections.Map(numbers, x =\u003e x * 2);\n// Output: { 2, 4, 6, 8, 10 }\n```\n\n### `Filter\u003cT\u003e(IEnumerable\u003cT\u003e collection, Func\u003cT, bool\u003e predicate)`\nFilters the items in a collection that satisfy a given condition.\n\n**Example usage:**\n```csharp\nvar numbers = new List\u003cint\u003e { 1, 2, 3, 4, 5 };\nvar evenNumbers = Collections.Filter(numbers, x =\u003e x % 2 == 0);\n// Output: { 2, 4 }\n```\n\n### `Reduce\u003cT, TAccumulate\u003e(IEnumerable\u003cT\u003e collection, Func\u003cTAccumulate, T, TAccumulate\u003e accumulator, TAccumulate initialValue)`\nReduces the collection into a single value by applying an accumulator function.\n\n**Example usage:**\n```csharp\nvar numbers = new List\u003cint\u003e { 1, 2, 3, 4, 5 };\nvar sum = Collections.Reduce(numbers, (acc, x) =\u003e acc + x, 0);\n// Output: 15\n```\n\n### `Repeat(int times, Action action)`\nRepeatedly executes a given action a specified number of times.\n\n**Example usage:**\n```csharp\nCollections.Repeat(3, () =\u003e Console.WriteLine(\"Hello, World!\"));\n// Output: Hello, World! (printed 3 times)\n```\n\n### `WhileTrue(Func\u003cbool\u003e condition, Action action)`\nContinuously executes a block of code while a condition is true.\n\n**Example usage:**\n```csharp\nint counter = 0;\nCollections.WhileTrue(() =\u003e counter \u003c 5, () =\u003e { counter++; Console.WriteLine(counter); });\n// Output: 1 2 3 4 5\n```\n\n### `Chunk\u003cT\u003e(IEnumerable\u003cT\u003e collection, int chunkSize)`\nDivides a collection into smaller chunks of a specified size.\n\n**Example usage:**\n```csharp\nvar numbers = new List\u003cint\u003e { 1, 2, 3, 4, 5, 6, 7, 8 };\nvar chunks = Collections.Chunk(numbers, 3);\n// Output: { {1, 2, 3}, {4, 5, 6}, {7, 8} }\n```\n\n## Variables Utilities\n\n### `Swap\u003cT\u003e(ref T x, ref T y)`\nSwaps the values of two variables.\n\n**Example usage:**\n```csharp\nint a = 5, b = 10;\nVariables.Swap(ref a, ref b);\n// After swapping, a = 10, b = 5\n```\n\n### `DefaultIfNull\u003cT\u003e(T variable, T defaultValue)`\nReturns the default value if the variable is null.\n\n**Example usage:**\n```csharp\nstring name = null;\nvar result = Variables.DefaultIfNull(name, \"Default Name\");\n// Output: \"Default Name\"\n```\n\n### `Coalesce\u003cT\u003e(params T[] values)`\nReturns the first non-null value from a list of variables.\n\n**Example usage:**\n```csharp\nstring a = null, b = \"Hello\", c = \"World\";\nvar result = Variables.Coalesce(a, b, c);\n// Output: \"Hello\"\n```\n\n### `LazyLoad\u003cT\u003e(Func\u003cT\u003e initializer)`\nLazily initializes a variable when it is accessed for the first time.\n\n**Example usage:**\n```csharp\nvar lazyValue = Variables.LazyLoad(() =\u003e \"This is lazy loaded\");\n// Output: \"This is lazy loaded\" (initialized when accessed)\n```\n\n### `MinMax\u003cT\u003e(IEnumerable\u003cT\u003e collection)`\nFinds both the minimum and maximum value in a collection in a single pass.\n\n**Example usage:**\n```csharp\nvar numbers = new List\u003cint\u003e { 1, 3, 2, 7, 4 };\nvar (min, max) = Variables.MinMax(numbers);\n// Output: min = 1, max = 7\n```\n\n### `Clamp\u003cT\u003e(T value, T min, T max)`\nEnsures that a value stays within a specific range.\n\n**Example usage:**\n```csharp\nint value = 10;\nvar clampedValue = Variables.Clamp(value, 5, 8);\n// Output: 8 (since 10 is outside the range 5-8)\n```\n\n### `Toggle(ref bool flag)`\nFlips the value of a boolean variable.\n\n**Example usage:**\n```csharp\nbool isActive = true;\nVariables.Toggle(ref isActive);\n// Output: isActive = false\n```\n\n### `RoundToNearest(double value, double increment)`\nRounds a number to the nearest specified increment.\n\n**Example usage:**\n```csharp\ndouble result = Variables.RoundToNearest(7.24, 0.5);\n// Output: 7.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneotoxic-off%2Fyue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneotoxic-off%2Fyue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneotoxic-off%2Fyue/lists"}