-
Notifications
You must be signed in to change notification settings - Fork 599
add findLastIndex and inRange utility functions to fast-web-utilities #5528
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
Conversation
365f875
to
ca166e1
Compare
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
3 similar comments
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
7158ee9
to
06c2b32
Compare
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
TS environments with strictNullChecks will throw errors if these parameters are optional.
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
2 similar comments
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://purple-ocean-0b7ce3410-5528.centralus.azurestaticapps.net |
Pull Request
📖 Description
findLastIndex
function to@microsoft/fast-web-utilities
, which returns the index of the last item in an array which causes a predicate function to returntrue
. Otherwise, it returnsfalse
. This is a simplified inversion of the built-inArray.prototype.findIndex
function.inRange
function to@microsoft/fast-web-utilities
, which returnstrue
orfalse
depending on if thevalue
is within the range of themin
andmax
. Ifmax
is not provided, the range is betweenmin
and0
(min
andmax
are sorted by value before the test is executed). This is a simplified adaptation of Lodash's_.inRange
function.👩💻 Reviewer Notes
These utility functions are needed for the upcoming listbox multiselect features.
📑 Test Plan
All tests should pass.
inRange
andfindLastIndex
will be used in an upcoming pull request.✅ Checklist
General
$ yarn change