-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal / Functions: add flow function #5
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The import statement for assertStrictEquals in function.ts has been updated to not include a specific version. This minor change is made to ensure that the latest version of 'assert' package is always used.
The pipe function was refactored to use rest parameters for increased readability and ease of use. This modification makes the function more flexible and shortens the code by eliminating redundant lines.
A new function named 'flow' was added to the 'function.ts' file. This function performs left-to-right function composition. Changes have also been made in the 'function.test.ts' to include tests for the newly added 'flow' function.
The import path in the predicate.test.ts and predicate.ts files has been changed to the correct ones. Also, a new 'type' test has been added in predicate.test.ts to check the type.
The flow function inside the src/internal/function.ts file has been enhanced with additional overloads to handle varying function arities . This provides more flexibility when creating function pipelines with multiple steps, supporting more complex data transformations.
Expanded the comments for the pipe function overloads to clearly list their arity. This improves readability of the code and provides immediate information about the function overloads without the need for additional documentation look-up.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 182 226 +44
Branches 21 32 +11
=========================================
+ Hits 182 226 +44 ☔ View full report in Codecov by Sentry. |
This commit includes the added directive to ignore linting for the 'no-explicit-any' rule. This is necessary for the predicate.test.ts file to ensure efficient testing without any linting interference.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The flow function, which performs left-to-right function composition, was added to src/internal/function.ts file. The functionality of flow was subsequently validated through newly introduced tests. Additionally, detailed comments were added for each overload of flow to enhance readability.