Add clampToMax function
#370
aleclarson
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
One of the few Radashi functions that should handle undefined inputs. The main use case for this function is when working with a configurable quantity that has an upper bound. For example, a request handler that queries a database might accept a
limitoption that cannot exceed 100.Notably, when the
valueis undefined or ≤ 0, themaxvalue is used. This is a maintenance improvement over the following "native" approach:Alternative naming:
upperBoundBeta Was this translation helpful? Give feedback.
All reactions