This is the direction I'm heading:
https://github.com/coolaj86/node-nat-upnp/blob/v1.0/lib/nat-upnp/ssdp.js
- switched from shimmed EventEmitter promise-ish things to proper Promises using
global.Promise || require('bluebird').Promise
- pulled the async code out of the constructor (since you can't pass callbacks or return promises from a constructor) and moved it to an
init()
- removed mutual dependencies
I plan to switch it to return however many IGDs respond.
This is the direction I'm heading:
https://github.com/coolaj86/node-nat-upnp/blob/v1.0/lib/nat-upnp/ssdp.js
global.Promise || require('bluebird').Promiseinit()I plan to switch it to return however many IGDs respond.