Given an IPv4 or IPv6 address determine if the address is a valid input. This has to be done using Typescript.
I wanted to use an NPM library ip-address as it seemed to meet all of my needs, but i couldnt get it to properly import and use it.
import {ipv4, ipv6} from 'ip-address'
var address = new ipv4(value)
if(address.IsValid){
// do work
}
I expected this to work after importing the npm module, but i get "package not found".