UNPKG

@ginden/blinkstick-v2

Version:
14 lines 620 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createBlinkstickSync = createBlinkstickSync; const node_hid_1 = require("node-hid"); const blinkstick_sync_1 = require("../../../core/versions/blinkstick.sync"); /** * @summary Creates a BlinkStickSync instance from a USB device. * @category Discovery */ function createBlinkstickSync(device) { const hidDevice = device.path ? new node_hid_1.HID(device.path) : new node_hid_1.HID(device.vendorId, device.productId); return new blinkstick_sync_1.BlinkstickSync(hidDevice); } //# sourceMappingURL=create-blinkstick-sync.js.map