parse-ip-port

1.0.0 • Public • Published

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());
}

Package Sidebar

Install

npm i parse-ip-port

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

2.55 kB

Total Files

4

Last publish

Collaborators

  • leecjson