From 230ab4589912afecb3b277e30bdcf74171dfeb2e Mon Sep 17 00:00:00 2001 From: Damir Mustafin Date: Sat, 13 Nov 2021 22:19:23 +0300 Subject: [PATCH] add undefined as a return type --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 2a29061..a48215f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -56,7 +56,7 @@ function ipv6_check (ip_addr: string) { /^ff([0-9a-fA-F]{2,2}):/i.test(ip_addr) } -export default (ip: string) => { +export default (ip: string): boolean | undefined => { if (is_valid(ip)) { const parsed = parse(ip)