Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bonjour-hap

Package Overview
Dependencies
Maintainers
9
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bonjour-hap - npm Package Compare versions

Comparing version 3.6.5 to 3.7.0

22

lib/Browser.js

@@ -85,4 +85,7 @@ 'use strict'

matches.forEach(function (service) {
if (self._serviceMap[service.fqdn]) return // ignore already registered services
self._addService(service)
if (self._serviceMap[service.fqdn]) {
self._updateService(service)
} else {
self._addService(service)
}
})

@@ -113,2 +116,17 @@ })

Browser.prototype._updateService = function (service) {
let cachedService, index
this.services.some(function (s, i) {
if (dnsEqual(s.fqdn, service.fqdn)) {
cachedService = s
index = i
return true
}
return false
})
if (!cachedService) return
this.services[index] = service
this.emit('update', service)
}
Browser.prototype._removeService = function (fqdn) {

@@ -115,0 +133,0 @@ let service, index

2

package.json
{
"name": "bonjour-hap",
"version": "3.6.5",
"version": "3.7.0",
"description": "A Bonjour/Zeroconf implementation in pure JavaScript (for HAP)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -115,2 +115,6 @@ # bonjour-hap

#### `Event: update`
Emitted every time an update is received for existing service is found that matches the browser.
#### `Event: down`

@@ -140,3 +144,3 @@

Emitted when the service is up.
Emitted when the service is up, and if the txt record of the service is updated `service.updateTxt(object)`.

@@ -143,0 +147,0 @@ #### `Event: error`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc