Skip to content

Commit

Permalink
fixes after mutation testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-craft committed Aug 22, 2023
1 parent ee5e29d commit 8aa44b9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class String {
return false;
}

return Number.isFinite(+value);
return Number.isFinite(Number(value));
}

/**
Expand Down Expand Up @@ -421,10 +421,6 @@ export class String {
* @returns {number} The converted number, or 0 if the input is not a valid number.
*/
static toNumber(value: StringOrNullOrUndefined): number {
if (value == undefined) {
return 0;
}

if (String.isNotNumber(value)) {
return 0;
}
Expand Down

0 comments on commit 8aa44b9

Please sign in to comment.