Skip to content

Commit

Permalink
refactor: rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
feb-dain committed Feb 12, 2023
1 parent 5a0924f commit 65b95d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validator/Validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ class Validator {
}
}

isNumber(number) {
isStringNumber(number) {
if (ONLY_NUMBER.test(number)) {
throw new Error(NOT_POSITIVE_NUMBER);
}
}

isValidTryCount(count) {
this.isNumber(count);
this.isStringNumber(count);

if (count < MINIMUM_TRY_COUNT) {
throw new Error(NOT_POSITIVE_NUMBER);
Expand Down

0 comments on commit 65b95d1

Please sign in to comment.