fix: nstr returns empty string for 0 with maxDecimals: 0 - #11
Open
shm-dtt wants to merge 3 commits into
Open
Conversation
|
@shm-dtt is attempting to deploy a commit to the shu Team on Vercel. A member of the Team first needs to authorize it. |
Bumps the npm_and_yarn group with 1 update in the / directory: [next](https://github.com/vercel/next.js). Bumps the npm_and_yarn group with 1 update in the /example directory: [next](https://github.com/vercel/next.js). Updates `next` from 15.5.0 to 15.5.7 - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v15.5.0...v15.5.7) Updates `next` from 15.5.0 to 15.5.7 - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v15.5.0...v15.5.7) --- updated-dependencies: - dependency-name: next dependency-version: 15.5.7 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: next dependency-version: 15.5.7 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
…rn-42d4ddb4a5 Bump the npm_and_yarn group across 2 directories with 1 update
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#9 - Fixed this issue.
Description:
When calling with e.g. nstr(0.3333333432674419, { maxDecimals: 0 }), the function returns an empty string ("") instead of "0". This happens because "0".replace(/.?0+$/, '') results in "". The expected result is "0".
This is fixed with the solution that was provided in the Issue link itself.