blinkstick.js
function () {
        if (isWin) {
            var devices = findBlinkSticks();

            return devices.length > 0 ? devices[0] : null;
        } else {
            var device = usb.findByIds(VENDOR_ID, PRODUCT_ID);
            if (device) return new BlinkStick(device);
        }
    }
function () {
        if (isWin) {
            var devices = findBlinkSticks();

            return devices.length > 0 ? devices[0] : null;
        } else {
            var device = usb.findByIds(VENDOR_ID, PRODUCT_ID);
            if (device) return new BlinkStick(device);
        }
    }
function ( ) { if ( isWin ) { var devices = findBlinkSticks ( ) ; return devices . length > 0 ? devices [ 0 ] : null ; } else { var device = usb . findByIds ( VENDOR_ID , PRODUCT_ID ) ; if ( device ) return new BlinkStick ( device ) ; } }
Find first attached BlinkStick.

@example
var blinkstick = require('blinkstick');
var led = blinkstick.findFirst();

@static
@method findFirst
@return {BlinkStick|undefined} The first BlinkStick, if found.
Find first attached BlinkStick .