File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export const IS_IP = 'isIp';
11
11
* If given value is not a string, then it returns false.
12
12
*/
13
13
export function isIP ( value : unknown , version ?: IsIpVersion ) : boolean {
14
+ /* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion */
14
15
const versionStr = version ? ( `${ version } ` as '4' | '6' ) : undefined ;
15
16
return typeof value === 'string' && isIPValidator ( value , versionStr ) ;
16
17
}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export const IS_ISBN = 'isIsbn';
11
11
* If given value is not a string, then it returns false.
12
12
*/
13
13
export function isISBN ( value : unknown , version ?: IsISBNVersion ) : boolean {
14
+ /* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion */
14
15
const versionStr = version ? ( `${ version } ` as '10' | '13' ) : undefined ;
15
16
return typeof value === 'string' && isIsbnValidator ( value , versionStr ) ;
16
17
}
You can’t perform that action at this time.
0 commit comments