Open monteslu opened 7 years ago
@monteslu Anymore considering on this? It seems like it would help with this React Native use case where we could pass in our own instance of Noble (in this case, an instance from react-native-ble
).
It's been a little while since I've looked at this so things may have changed (for the better), but I know I was struggling to get it to work due to the having to use rn-nodeify
to shim react-native-ble
as noble
Yeah, maybe make noble an optional dep and use default constructor if a noble instance isn't passed in?
That sounds like a good approach to me.
Now that we have https://github.com/sandeepmistry/noble/blob/master/with-bindings.js it's possible to be specific about how noble is instantiated. This is particularly helpful for things like the noble-webbluetooth shim.
Should we yank the dependency and require people to pass it to the ble-serial constructor?