mdns-resolver
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

mdns-resolver

A Node.js module to resolve zeroconf .local domains using pure JavaScript.

Usage

const mdnsResolver = require('mdns-resolver')
 
mdnsResolver.resolve('hostname.local', 'A')
  .then(console.log)
  // 192.168.1.28
 
mdnsResolver.resolve4('hostname.local')
  .then(console.log)
  // 192.168.1.28
 
mdnsResolver.resolve6('hostname.local')
  .then(console.log)
  // fe80::20c:29ff:fea5:99f6

Readme

Keywords

Package Sidebar

Install

npm i mdns-resolver

Weekly Downloads

105

Version

1.1.0

License

MIT

Unpacked Size

5.83 kB

Total Files

5

Last publish

Collaborators

  • oznu