hti

host-to-ip

A flexible way to look up IP addresses for host names and URLs

Showing:

Popularity

Downloads/wk

84

Maintenance

No Maintenance Data Available

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

host-to-ip

A flexible way to look up IP addresses for host names (e.g. github.com) and URLs (e.g. https://api.github.com).

Install

npm install --save host-to-ip

Usage

const hostToIp = require('host-to-ip');

const hostname = 'github.com'
const fqdn = 'https://api.github.com'

hostToIp(hostname).then(ip => console.log(ip)).catch(err => console.error(err))
//=> '192.30.253.112'

hostToIp(fqdn, {all: true, family: 4}).then(ip => console.log(ip)).catch(err => console.error(err))
//=> [{"address": "192.30.253.116", "family": 4}, {"address": "192.30.253.117", "family": 4}]

License

MIT © Peter Benjamin

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100