Skip to content

Commit

Permalink
[CI] Update Stats & Extensions Docs
Browse files Browse the repository at this point in the history
Signed-off-by: BirjuVachhani <BirjuVachhani@users.noreply.github.com>
  • Loading branch information
BirjuVachhani committed Jun 17, 2024
1 parent 2797f4d commit 608b9e8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
26 changes: 17 additions & 9 deletions EXTENSIONS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Extensions
> *This file is auto generated. Do not edit this file manually.*
> *Last Updated: Sat, Mar 23, 2024 - 10:13 AM*
> *Last Updated: Mon, Jun 17, 2024 - 12:37 PM*

### on Comparable<dynamic>
Expand Down Expand Up @@ -179,14 +179,21 @@
| [`absoluteSeconds`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/duration/duration.dart#L81) | `GETTER` | Returns remaining minutes after deriving minutes. |


### on Object?
| Extension | Type | Description |
|---|---|---|
| [`isTruthy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L40) | `GETTER` | Checks truthiness of the value. |
| [`isFalsy`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L50) | `GETTER` | Checks false-ness of the value. |


### on Object
| Extension | Type | Description |
|---|---|---|
| [`apply`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L41) | `METHOD` | Calls the specified function `block` with `this` value as its argument and returns `this` value. |
| [`run`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L48) | `METHOD` | Calls the specified function `block` with `this` value as its argument and returns `this` value. |
| [`takeIf`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L54) | `METHOD` | Returns `this` if it satisfies the given `predicate` or null, if it doesn't. |
| [`takeUnless`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L63) | `METHOD` | Returns `this` if it doesn't satisfy the given `predicate` or null, if it doesn't. |
| [`tryCast`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L72) | `METHOD` | A safe cast operation that returns null if the cast is not possible. Otherwise, returns the casted value. |
| [`apply`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L57) | `METHOD` | Calls the specified function `block` with `this` value as its argument and returns `this` value. |
| [`run`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L64) | `METHOD` | Calls the specified function `block` with `this` value as its argument and returns `this` value. |
| [`takeIf`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L70) | `METHOD` | Returns `this` if it satisfies the given `predicate` or null, if it doesn't. |
| [`takeUnless`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L79) | `METHOD` | Returns `this` if it doesn't satisfy the given `predicate` or null, if it doesn't. |
| [`tryCast`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L88) | `METHOD` | A safe cast operation that returns null if the cast is not possible. Otherwise, returns the casted value. |


### on bool
Expand Down Expand Up @@ -274,7 +281,7 @@
|---|---|---|
| [`isBlank`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/string.dart#L40) | `GETTER` | Returns true if `this` only contains white-spaces. |
| [`isNotBlank`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/string.dart#L43) | `GETTER` | Returns true if `this` contains characters other than white-spaces. |
| [`capitalized`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/string.dart#L48) | `GETTER` | Converts the first character of `this` to upper case. Note that this does not work if the first character of this string is an Emoji character. |
| [`capitalized`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/string.dart#L48) | `GETTER` | Converts the first character of `this` to upper case. using `characters` allows to handle unicode characters that are more than 1 byte long. e.g. emojis. |
| [`isBinary`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/string.dart#L113) | `GETTER` | Returns true if `this` is a binary string which only contains 1's and 0's |
| [`isHexadecimal`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/string.dart#L117) | `GETTER` | Returns true if `this` is a hex string which only contains 0-9 and A-F | a-f |
| [`isOctal`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/string.dart#L121) | `GETTER` | Returns true if `this` is a hex string which only contains 0-7 |
Expand Down Expand Up @@ -340,11 +347,12 @@
| [`post`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/async/future.dart#L39) | Runs given `action` no sooner than in the next event-loop iteration, after all micro-tasks have run. |
| [`postDelayed`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/async/future.dart#L44) | Runs given `action` after a delay of `millis`, no sooner than in the next event-loop iteration, after all micro-tasks have run. |
| [`now`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/datetime/date_time.dart#L303) | shot for `DateTime.now` |
| [`TODO`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L84) | Always throws `UnimplementedError` stating that operation is not implemented. |
| [`runCaching`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L110) | Executes a provided action and handles potential errors. The function returns T? which represents the result of the executed action if the action is not asynchronous. If the action completes successfully, the result is returned as is. If an exception occurs during the execution, the `onError` function is called with the error and stack trace. If the `onError` function is not provided or returns null, the error is swallowed and the result is set to null. The function returns a `Future` of type T? which represents the result of the executed action if the action is asynchronous. If the action completes successfully, the result is returned as is. If an exception occurs during the execution, the `onError` function is called with the error and stack trace. If the `onError` function is not provided or returns null, the error is swallowed and the result is set to null. If the `onError` function is synchronous, the result is returned as is. If it throws an error, the error is swallowed and the result is set to null. If the `onError` function is asynchronous, a `Future` of type T? is returned. If the `onError` function completes successfully, the result is returned as is. If it throws an error, the error is swallowed and the result is set to null. |
| [`TODO`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L100) | Always throws `UnimplementedError` stating that operation is not implemented. |
| [`runCaching`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/generic/generic.dart#L126) | Executes a provided action and handles potential errors. The function returns T? which represents the result of the executed action if the action is not asynchronous. If the action completes successfully, the result is returned as is. If an exception occurs during the execution, the `onError` function is called with the error and stack trace. If the `onError` function is not provided or returns null, the error is swallowed and the result is set to null. The function returns a `Future` of type T? which represents the result of the executed action if the action is asynchronous. If the action completes successfully, the result is returned as is. If an exception occurs during the execution, the `onError` function is called with the error and stack trace. If the `onError` function is not provided or returns null, the error is swallowed and the result is set to null. If the `onError` function is synchronous, the result is returned as is. If it throws an error, the error is swallowed and the result is set to null. If the `onError` function is asynchronous, a `Future` of type T? is returned. If the `onError` function completes successfully, the result is returned as is. If it throws an error, the error is swallowed and the result is set to null. |
| [`randomBool`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/bool.dart#L47) | Generates a random boolean value. |
| [`randomDouble`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/double.dart#L70) | Generates a non-negative random floating point value uniformly distributed in the range from 0.0, inclusive, to 1.0, exclusive. |
| [`randomInt`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/primitive/int.dart#L146) | Generates a non-negative random integer uniformly distributed in the range rom 0, inclusive, to `max`, exclusive. default `max` is 1_000_000 |
| [`debounce`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/src/helpers/debouncer.dart#L203) | Helper function to debounce `action` calls using global `deBouncer` instance. If `immediateFirstRun` is set to true, it will run the `action` immediately for the first call and then it will wait for `duration` to run the next call if there's any. This is helpful when you want to debounce a method call without creating an instance of `DeBouncer` class. However, you can create an instance of `DeBouncer` and use it for debouncing actions as well. CAUTION: This function will use the global instance of `DeBouncer` and it will be shared across the application. If you want to have different debounce settings for different actions, you should create an instance of `DeBouncer` and use it for debouncing actions. Also, it is recommended to use this function only for simple use cases where you don't need to debounce 2 different actions at the same time! Otherwise, it will cause conflicts between the actions and you may not get the desired results. If you need to debounce multiple actions, you should create an instance of `DeBouncer` for each action. To cancel the current timer, you can call `DeBouncer.cancel` method on the global instance of `deBouncer`. e.g. ```dart // Using global instance of deBouncer to debounce actions. debounce(() { // your action here print('debounced action'); }); ``` ```dart debouncer.cancel(); // cancels the current action on global instance. ``` This will run the action immediately for the first call and then it will wait for 300 milliseconds to run the next call if there's any. |
| [`checkNotNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/src/helpers/pre_conditions.dart#L39) | Throws `IllegalStateException` if `argument` is `null`. If `name` is supplied, it is used as the parameter name in the error message. Returns the `argument` if it is not null. |
| [`check`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/src/helpers/pre_conditions.dart#L45) | Throws `IllegalStateException` if `value` is false. |
| [`requireNotNull`](https://github.com/BirjuVachhani/screwdriver/blob/main/lib/src/helpers/pre_conditions.dart#L54) | Throws `IllegalArgumentException` if `argument` is `null`. If `message` is supplied, it is used as the error message. Returns the `argument` if it is not null. |
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ A dart package aiming to provide useful extensions and helper functions to ease
Check out [EXTENSIONS.md](EXTENSIONS.md) for a complete list of all the available extensions.
<!---stats_start-->
```yaml
Extensions: 236
Extensions: 238
Helper Classes: 5
Helper Functions & Getters: 19
Helper Functions & Getters: 21
Typedefs: 8
Mixins: 2
```
> *Last Updated: Sat, Mar 23, 2024 - 10:13 AM*
> *Last Updated: Mon, Jun 17, 2024 - 12:36 PM*
<!---stats_end-->
Expand Down

0 comments on commit 608b9e8

Please sign in to comment.