An open API service indexing awesome lists of open source software.

https://github.com/leecjson/node-parse-ip-port

Parse ip/hostname and port from a string that formed by "ip:port"
https://github.com/leecjson/node-parse-ip-port

Last synced: 11 months ago
JSON representation

Parse ip/hostname and port from a string that formed by "ip:port"

Awesome Lists containing this project

README

          

# node-ip-port
Parse ip and port from a string that formed by \"ip:port\"

# Usage
```javascript
const parseIpPort = require('parse-ip-port');

try {
const [ip, port] = parseIpPort('127.0.0.1:80');
} catch (e) {
console.log(e.toString());
}
```