Skip to content

Commit

Permalink
refactor: ignore linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
NoNameProvided committed Nov 20, 2021
1 parent 6a57621 commit 8e841ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/decorator/string/IsIP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const IS_IP = 'isIp';
* If given value is not a string, then it returns false.
*/
export function isIP(value: unknown, version?: IsIpVersion): boolean {
/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion */
const versionStr = version ? (`${version}` as '4' | '6') : undefined;
return typeof value === 'string' && isIPValidator(value, versionStr);
}
Expand Down
1 change: 1 addition & 0 deletions src/decorator/string/IsISBN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const IS_ISBN = 'isIsbn';
* If given value is not a string, then it returns false.
*/
export function isISBN(value: unknown, version?: IsISBNVersion): boolean {
/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion */
const versionStr = version ? (`${version}` as '10' | '13') : undefined;
return typeof value === 'string' && isIsbnValidator(value, versionStr);
}
Expand Down

0 comments on commit 8e841ef

Please sign in to comment.