From bba8de5ca72a7f60e84fa475b31d5e6d87be4ba8 Mon Sep 17 00:00:00 2001 From: birjuvachhani Date: Thu, 14 Nov 2024 17:21:01 +0530 Subject: [PATCH] :memo: update EXTENSIONS.md --- EXTENSIONS.md | 160 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 113 insertions(+), 47 deletions(-) diff --git a/EXTENSIONS.md b/EXTENSIONS.md index 619636a..a506811 100644 --- a/EXTENSIONS.md +++ b/EXTENSIONS.md @@ -1,6 +1,58 @@ -# Extensions +# Docs > *This file is auto generated. Do not edit this file manually.* -> *Last Updated: Thu, Nov 07, 2024 - 06:26 AM* +> *Last Updated: Thu, Nov 14, 2024 - 05:17 PM* + + +## Table of Contents +- [Extensions](#extensions) + - [Comparable](#on-Comparable) + - [Iterable](#on-Iterable) + - [Iterable?](#on-Iterable?) + - [List](#on-List) + - [Iterable?>?](#on-Iterable?>?) + - [Iterator](#on-Iterator) + - [List](#on-List) + - [Map](#on-Map) + - [DateTime](#on-DateTime) + - [Duration](#on-Duration) + - [Object?](#on-Object?) + - [Object](#on-Object) + - [Iterable](#on-Iterable) + - [Pattern](#on-Pattern) + - [bool](#on-bool) + - [double](#on-double) + - [int](#on-int) + - [num](#on-num) + - [num](#on-num) + - [num?](#on-num?) + - [Object?](#on-Object?) + - [String](#on-String) + - [String?](#on-String?) + - [File](#on-File) +- [Functions](#functions) + - [post](#post) + - [postDelayed](#postDelayed) + - [now](#now) + - [TODO](#TODO) + - [runCaching](#runCaching) + - [randomBool](#randomBool) + - [randomDouble](#randomDouble) + - [randomInt](#randomInt) + - [complete](#complete) + - [debounce](#debounce) + - [checkNotNull](#checkNotNull) + - [check](#check) + - [requireNotNull](#requireNotNull) + - [require](#require) + - [checkLeapYear](#checkLeapYear) + - [tryJsonDecode](#tryJsonDecode) +- [Extension Types](#extension-types) + - [Degrees](#Degrees) + - [Radians](#Radians) + - [Turns](#Turns) + + +# Extensions ### on Comparable @@ -22,7 +74,7 @@ | [`thirdOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L45) | `GETTER` | Returns the third element in the iterable or returns null if iterable is empty or has less than 3 elements. | | [`lastIndex`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L48) | `GETTER` | Returns the index of the last element in the collection. | | [`hasOnlyOneElement`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L51) | `GETTER` | Returns true if the collection only has 1 element. | -| [`records`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L488) | `GETTER` | Returns an iterable containing the items with their respective indices in form of records. | +| [`records`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L497) | `GETTER` | Returns an iterable containing the items with their respective indices in form of records. | | [`filterTo`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L55) | `METHOD` | Appends all elements matching the given `predicate` to the given `destination`. | | [`filter`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L64) | `METHOD` | alias for `Iterable.where` | | [`filterIndexed`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L68) | `METHOD` | alias for `whereIndexed` which returns a new lazy Iterable. | @@ -50,51 +102,52 @@ | [`intersect`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L238) | `METHOD` | Returns a set containing all elements that are contained by both `this` iterable and the `other` iterable. | | [`subtract`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L243) | `METHOD` | Returns a set containing all elements that are contained by `this` iterable and not contained by the `other` iterable. | | [`union`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L247) | `METHOD` | Returns an iterable containing all distinct elements from both iterables. | -| [`count`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L250) | `METHOD` | Returns the number of elements matching the given `predicate`. | -| [`foldRight`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L262) | `METHOD` | Accumulates value starting with `initialValue` value and applying `operation` from right to left to each element and current accumulator value. | -| [`foldRightIndexed`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L276) | `METHOD` | Accumulates value starting with `initialValue` value and applying `operation` from right to left to each element with its index in the original list and current accumulator value. | -| [`randomOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L289) | `METHOD` | Returns a random element from `this`. Returns null if no elements are present. | -| [`random`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L297) | `METHOD` | Returns a random element from `this`. Throws `StateError` if there are no elements in the collection. | -| [`onEach`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L305) | `METHOD` | Performs the given `action` on each element and returns the iterable itself afterwards. | -| [`maxByOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L309) | `METHOD` | Returns the first element yielding the largest value of the given function or `null` if there are no elements. | -| [`maxBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L328) | `METHOD` | Returns the first element yielding the largest value of the given function. Throws `StateError` if there are no elements in the collection. | -| [`maxByLastOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L345) | `METHOD` | Returns the last element yielding the largest value of the given function or `null` if there are no elements. | -| [`maxByLast`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L364) | `METHOD` | Returns the last element yielding the largest value of the given function. Throws `StateError` if there are no elements in the collection. | -| [`minByOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L381) | `METHOD` | Returns the first element yielding the smallest value of the given function or `null` if there are no elements. | -| [`minBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L400) | `METHOD` | Returns the first element yielding the smallest value of the given function. Throws `StateError` if there are no elements in the collection. | -| [`minByLastOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L417) | `METHOD` | Returns the last element yielding the smallest value of the given function or `null` if there are no elements. | -| [`minByLast`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L436) | `METHOD` | Returns the last element yielding the smallest value of the given function. Throws `StateError` if there are no elements in the collection. | -| [`sumBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L453) | `METHOD` | Returns the sum of all values produced by `selector` function applied to each element in the collection. | -| [`averageBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L459) | `METHOD` | Returns the average of all values produced by `selector` function applied to each element in the collection. | -| [`except`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L465) | `METHOD` | Alias for `subtract`. | -| [`containsAll`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L469) | `METHOD` | Returns true if the collection contains all the elements present in `other` collection. | -| [`containsNone`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L473) | `METHOD` | Returns true if the collection doesn't contain any of the elements present in `other` collection. | -| [`findBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L496) | `METHOD` | Finds an element where the result of `selector` matches the `query`. Throws `StateError` if no element is found. | -| [`findByOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L505) | `METHOD` | Finds an element where the result of `selector` matches the `query`. Returns null if no element is found. | -| [`findAllBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L514) | `METHOD` | Finds all elements where the result of `selector` matches the `query`. Returns empty collection if no element is found. | +| [`countBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L250) | `METHOD` | Returns the number of elements matching the given `predicate`. | +| [`count`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L260) | `METHOD` | Returns the number of elements matching the given `predicate`. | +| [`foldRight`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L271) | `METHOD` | Accumulates value starting with `initialValue` value and applying `operation` from right to left to each element and current accumulator value. | +| [`foldRightIndexed`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L285) | `METHOD` | Accumulates value starting with `initialValue` value and applying `operation` from right to left to each element with its index in the original list and current accumulator value. | +| [`randomOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L298) | `METHOD` | Returns a random element from `this`. Returns null if no elements are present. | +| [`random`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L306) | `METHOD` | Returns a random element from `this`. Throws `StateError` if there are no elements in the collection. | +| [`onEach`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L314) | `METHOD` | Performs the given `action` on each element and returns the iterable itself afterwards. | +| [`maxByOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L318) | `METHOD` | Returns the first element yielding the largest value of the given function or `null` if there are no elements. | +| [`maxBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L337) | `METHOD` | Returns the first element yielding the largest value of the given function. Throws `StateError` if there are no elements in the collection. | +| [`maxByLastOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L354) | `METHOD` | Returns the last element yielding the largest value of the given function or `null` if there are no elements. | +| [`maxByLast`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L373) | `METHOD` | Returns the last element yielding the largest value of the given function. Throws `StateError` if there are no elements in the collection. | +| [`minByOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L390) | `METHOD` | Returns the first element yielding the smallest value of the given function or `null` if there are no elements. | +| [`minBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L409) | `METHOD` | Returns the first element yielding the smallest value of the given function. Throws `StateError` if there are no elements in the collection. | +| [`minByLastOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L426) | `METHOD` | Returns the last element yielding the smallest value of the given function or `null` if there are no elements. | +| [`minByLast`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L445) | `METHOD` | Returns the last element yielding the smallest value of the given function. Throws `StateError` if there are no elements in the collection. | +| [`sumBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L462) | `METHOD` | Returns the sum of all values produced by `selector` function applied to each element in the collection. | +| [`averageBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L468) | `METHOD` | Returns the average of all values produced by `selector` function applied to each element in the collection. | +| [`except`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L474) | `METHOD` | Alias for `subtract`. | +| [`containsAll`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L478) | `METHOD` | Returns true if the collection contains all the elements present in `other` collection. | +| [`containsNone`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L482) | `METHOD` | Returns true if the collection doesn't contain any of the elements present in `other` collection. | +| [`findBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L505) | `METHOD` | Finds an element where the result of `selector` matches the `query`. Throws `StateError` if no element is found. | +| [`findByOrNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L514) | `METHOD` | Finds an element where the result of `selector` matches the `query`. Returns null if no element is found. | +| [`findAllBy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L523) | `METHOD` | Finds all elements where the result of `selector` matches the `query`. Returns empty collection if no element is found. | ### on Iterable? | Extension | Type | Description | |---|---|---| -| [`isNullOrEmpty`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L524) | `GETTER` | Returns true if `this` is either null or empty collection. | -| [`isBlank`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L531) | `GETTER` | Alias for `isNullOrEmpty`. Returns true if `this` is either null or empty collection. | -| [`isNotBlank`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L535) | `GETTER` | Alias for `isNotNullOrEmpty`. Returns true if `this` is neither null nor empty collection. | -| [`isNotNullOrEmpty`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L538) | `GETTER` | Returns true if `this` is neither null nor empty collection. | +| [`isNullOrEmpty`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L533) | `GETTER` | Returns true if `this` is either null or empty collection. | +| [`isBlank`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L540) | `GETTER` | Alias for `isNullOrEmpty`. Returns true if `this` is either null or empty collection. | +| [`isNotBlank`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L544) | `GETTER` | Alias for `isNotNullOrEmpty`. Returns true if `this` is neither null nor empty collection. | +| [`isNotNullOrEmpty`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L547) | `GETTER` | Returns true if `this` is neither null nor empty collection. | ### on List | Extension | Type | Description | |---|---|---| -| [`toBase64`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L548) | `METHOD` | Converts the list of integers to a base64 encoded string. e.g. converting bytes to base64 string. | -| [`toUint8List`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L551) | `METHOD` | Converts `this` list of integers to a `Uint8List`. | -| [`toUint16List`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L554) | `METHOD` | Converts `this` list of integers to a `Uint16List`. | +| [`toBase64`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L557) | `METHOD` | Converts the list of integers to a base64 encoded string. e.g. converting bytes to base64 string. | +| [`toUint8List`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L560) | `METHOD` | Converts `this` list of integers to a `Uint8List`. | +| [`toUint16List`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L563) | `METHOD` | Converts `this` list of integers to a `Uint16List`. | ### on Iterable?>? | Extension | Type | Description | |---|---|---| -| [`flattenedNotNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L560) | `GETTER` | Flattens the nested iterable to a single iterable. | +| [`flattenedNotNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/collection/iterable.dart#L569) | `GETTER` | Flattens the nested iterable to a single iterable. | ### on Iterator @@ -286,8 +339,8 @@ | Extension | Type | Description | |---|---|---| | [`negative`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L41) | `GETTER` | converts positive numbers into negative ones. Use `abs` for conversion to positive numbers. | -| [`inRadians`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L55) | `GETTER` | Turns this number from degrees to radians. | -| [`inDegrees`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L58) | `GETTER` | Turns this number from radians to degrees. | +| [`inRadians`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L57) | `GETTER` | Turns this number from degrees to radians. | +| [`inDegrees`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L62) | `GETTER` | Turns this number from radians to degrees. | | [`isBetween`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L46) | `METHOD` | Returns true if `this` falls between `value1` and `value2` irrespective of the order of `value1` and `value2`. Includes boundaries if `inclusive` is true. | | [`roundToPrecision`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L51) | `METHOD` | Rounds value `precision` number of fraction points. | @@ -295,23 +348,26 @@ ### on num | Extension | Type | Description | |---|---|---| -| [`max`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L68) | `METHOD` | Returns `upperBound` if this value is greater than or equal to `upperBound`, otherwise returns this value. | -| [`min`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L78) | `METHOD` | Returns `lowerBound` if this value is less than or equal to `lowerBound`, Otherwise returns this value. | -| [`clampAtLeast`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L85) | `METHOD` | Returns this value if it is greater than or equal to `lowerBound`. Returns `lowerBound` otherwise. | -| [`clampAtMost`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L89) | `METHOD` | Returns this value if it is less than or equal to `upperBound`. Returns `upperBound` otherwise. | -| [`plus`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L92) | `METHOD` | Alias for add operation. | -| [`minus`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L95) | `METHOD` | Alias for subtract operation. | -| [`multiply`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L98) | `METHOD` | Alias for multiply operation. | -| [`divide`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L101) | `METHOD` | Alias for divide operation. | -| [`mod`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L104) | `METHOD` | Alias for modulo operation. | +| [`degrees`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L113) | `GETTER` | Creates an `Degrees` object from this value. This `Degrees` object being an extension type on `double` can be used everywhere `double` is used. | +| [`radians`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L118) | `GETTER` | Creates an `Radians` object from this value. This `Radians` object being an extension type on `double` can be used everywhere `double` is used. | +| [`turns`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L122) | `GETTER` | Creates an `Turns` object from this value. This `Turns` object being an extension type on `double` can be used everywhere | +| [`max`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L72) | `METHOD` | Returns `upperBound` if this value is greater than or equal to `upperBound`, otherwise returns this value. | +| [`min`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L82) | `METHOD` | Returns `lowerBound` if this value is less than or equal to `lowerBound`, Otherwise returns this value. | +| [`clampAtLeast`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L89) | `METHOD` | Returns this value if it is greater than or equal to `lowerBound`. Returns `lowerBound` otherwise. | +| [`clampAtMost`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L93) | `METHOD` | Returns this value if it is less than or equal to `upperBound`. Returns `upperBound` otherwise. | +| [`plus`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L96) | `METHOD` | Alias for add operation. | +| [`minus`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L99) | `METHOD` | Alias for subtract operation. | +| [`multiply`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L102) | `METHOD` | Alias for multiply operation. | +| [`divide`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L105) | `METHOD` | Alias for divide operation. | +| [`mod`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L108) | `METHOD` | Alias for modulo operation. | ### on num? | Extension | Type | Description | |---|---|---| -| [`orZero`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L110) | `GETTER` | Returns this value or 0 if null. Useful for equations. | -| [`orOne`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L113) | `GETTER` | Returns this value or 1 if null. Useful for equations. | -| [`or`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L116) | `METHOD` | Returns this or `value` if null. Useful for equations. | +| [`orZero`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L128) | `GETTER` | Returns this value or 0 if null. Useful for equations. | +| [`orOne`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L131) | `GETTER` | Returns this value or 1 if null. Useful for equations. | +| [`or`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/num.dart#L134) | `METHOD` | Returns this or `value` if null. Useful for equations. | ### on Object? @@ -419,3 +475,13 @@ | [`tryJsonDecode`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/src/utils.dart#L58) | A safe json decode function that uses `jsonDecode` and returns null if decoding fails. | +# Extensions Types (3) + + +| Extension Type | on | Description | +|---|---|---| +| [`Degrees`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/src/helpers/angle.dart#L6) | `double` | Represents an angle in degrees. This extension type is zero-cost wrapper for double value representing an angle in degrees making the code more readable and safe. | +| [`Radians`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/src/helpers/angle.dart#L19) | `double` | Represents an angle in radians. This extension type is zero-cost wrapper for double value representing an angle in radians making the code more readable and safe. | +| [`Turns`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/src/helpers/angle.dart#L32) | `double` | Represents an angle in turns. This extension type is zero-cost wrapper for double value representing an angle in turns making the code more readable and safe. | + +