-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add $ReadOnlyArray support to ramda includes + contains (#3633)
Ramda's includes (same as contains, but contains is deprecated), would not respect $ReadOnlyArray. These changes allow for $ReadOnlyArray and also enforce a strict case when it comes to using strings (only strings may be compared with strings). Tests have been added to enforce this behavior. Some tests have been problematic to enforce - namely the all-arity version of $ReadOnlyArray. It is not well understood why this is happening, but there are comments noting the expected outcome vs. actual. I don't believe it's a covariance issue, because 1) the curried form works fine, and 2) string and number shouldn't be covariant. I also took the liberty of sorting some of the import lists, because it's very easy to find/place things when it's alphabetized :)
- Loading branch information
1 parent
0a60bb2
commit 313c0f9
Showing
8 changed files
with
424 additions
and
56 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.