multicast-dns-service-types
Parse and stringify mdns service types
Last updated 12 years ago by mafintosh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install multicast-dns-service-types 
SYNC missed versions from official npm registry.

multicast-dns-service-types

Parse and stringify mdns service types

npm install multicast-dns-service-types

build status

Usage

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

License

MIT

Current Tags

  • 1.1.0                                ...           latest (12 years ago)

3 Versions

  • 1.1.0                                ...           12 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 7
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE