Skip to content
Parse and stringify mdns service types
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore first commit Apr 9, 2015
.travis.yml add travis Apr 9, 2015
LICENSE first commit Apr 9, 2015
index.js underscores not mandatory Apr 12, 2015
package.json 1.1.0 Apr 12, 2015
test.js be standard Apr 9, 2015


Parse and stringify mdns service types

npm install multicast-dns-service-types

build status


var types = require('multicast-dns-service-types')

console.log(types.stringify({name: 'http', protocol: 'tcp', subtypes: ['sub1', 'sub2']})) // _http._tcp._sub1._sub2
console.log(types.parse('_http._tcp._sub1._sub2')) // {name: 'http', protocol: 'tcp', subtypes: ['sub1', 'sub2']}

The following shorthands also exist

types.stringify(name, protocol, subtypes)
types.tcp(name, subtypes) // set protocol to tcp
types.udp(name, subtypes) // set protocol to udp



You can’t perform that action at this time.