-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
add BigInt.fromString and BigInt.fromNumber #2399
Conversation
🦋 Changeset detectedLatest commit: e946010 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/effect/src/Number.ts
Outdated
* @param s - The string to be converted to a `number`. | ||
* @returns An `Option` type that is either `some(number)` if the string can be converted | ||
* to a valid number, or `none` if the string is empty or contains invalid characters | ||
* for number conversion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param s - The string to be converted to a `number`. | |
* @returns An `Option` type that is either `some(number)` if the string can be converted | |
* to a valid number, or `none` if the string is empty or contains invalid characters | |
* for number conversion. | |
* @param s - The string to be converted to a `number`. |
Redundant (repetition of function description)
@fubhy thank you. I applied your change-request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
@tim-smart @fubhy thank you for patience 👍 |
Type
Description
According to #1766 , I added 4 functions.
Number.fromString
Number.fromBigInt
BigInt.fromString
BigInt.fromNumber
I changed
number
variable inNumber.ts
tonumber_
for usingNumber.MAX_SAFE_INTEGER
andNumber.MIN_SAFE_INTEGER
Related