Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1k
Assert if a string is a valid finite numeric value#1015
Unanswered
romanstetsyk asked this question instdlib-bot Q&A
-
Is there a package to check if a string is a valid finite numeric value? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment 1 reply
-
Unknown. Disclaimer
|
BetaWas this translation helpful?Give feedback.
All reactions
1 reply
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
@romanstetsyk If you are just wanting to know that a value is finite, you can do something like constisFinite=require('@stdlib/assert-is-finite').isPrimitive;// ...constbool=isFinite(parseFloat(value));// returns <boolean> If you are wanting to know if a value is within a certain range, you can do something like constisBetween=require('@stdlib/assert-is-between');// ...consthigh=100;constlow=10;constbool=isBetween(parseFloat(value),low,high);// returns <boolean> Links |
BetaWas this translation helpful?Give feedback.
All reactions
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment