futomi/node-dns-sd

[feature request] accept a function on `filter` param of `discover()` method

dayflower opened this issue · 3 comments

I would appreciate it if this product could also accept a function on filter param of discover() method.

Like this:

mDnsSd.discover({
  name: '_googlecast._tcp.local',
  filter: (device) => {
    return device['modelName'] && device['modelName'] === 'Google Home Mini'
        && device['familyName'] && device['familyName'] === 'Living Room'
  }
});

Thank you so much for your feedback. That's a nice idea! I'll implement the filter parameter to the discover() method soon. Give me some time.

I implemented the function-based filter in the discover() method. Try the latest version.

Great!

thanks