Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 622 Bytes

UPGRADING.md

File metadata and controls

44 lines (30 loc) · 622 Bytes

Upgrading

2.0 to 3.0

@achingbrain/ssdp is now ESM-only and no longer supports wildcard events. The discovery method returns an async iterator of discovered services.

1.0 to 2.0

@achingbrain/ssdp moved from a callback model to a promises based model. All other arguments remained the same.

Before

bus.advertise({
  // ...
}, (error, advert) => {

  advert.service.details((error, details) => {

  })
})

After

bus.advertise({
  // ...
})
.then(advert => {

  advert.service.details()
  .then(details => {

  })
  .catch(error => {

  })
})
.catch(error => {

})