Skip to content

adding safe conversion #1092

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

Closed
wants to merge 1 commit into from
Closed

Conversation

alexjavabraz
Copy link
Collaborator

No description provided.

Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
14.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@@ -373,6 +373,13 @@ export function promiseWithTimeout<T>(promise: Promise<T>, timeoutMs: number): P
return Promise.race([promise, awaitTimeout(timeoutMs)]);
}

export function convertStringToNumberSafety(str: string):number {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@annipi here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth checking NaN case to keep it available as a more general use util

Copy link

@leoiovlabs leoiovlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants