shuttle-node
Version:
An npm module for interfacing with the Contour Shuttle devices in Node.js
21 lines • 690 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isHID_Device = isHID_Device;
exports.isHID_HID = isHID_HID;
/*
* This file contains internal convenience functions
*/
function isHID_Device(device) {
return (typeof device === 'object' &&
device.vendorId !== undefined &&
device.productId !== undefined &&
device.interface !== undefined);
}
function isHID_HID(device) {
return (typeof device === 'object' &&
device.write !== undefined &&
device.getFeatureReport !== undefined &&
device.devicePath !== undefined // yes, HID.HID exposes this, we're using that
);
}
//# sourceMappingURL=lib.js.map