UNPKG

node-switchbot

Version:

The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).

10 lines 385 B
/** * Generic type guard for BLE device service data by model. * @param data The BLE service data object. * @param model The SwitchBotBLEModel enum to check against. * @returns True if data.model matches, and narrows to the specific service data type. */ export function isServiceDataOfModel(data, model) { return data.model === model; } //# sourceMappingURL=ble-guards.js.map