parse-ip-port
v1.0.0
Published
Parse ip and port from a string that formed by "ip:port"
Downloads
7
Maintainers
Readme
node-ip-port
Parse ip and port from a string that formed by "ip:port"
Usage
const parseIpPort = require('parse-ip-port');
try {
const [ip, port] = parseIpPort('127.0.0.1:80');
} catch (e) {
console.log(e.toString());
}