blinkstick.js
function (callback) {
        var result = [];

        var devices = findBlinkSticks();
        var i = 0;

        var finder = function() {

            if (i == devices.length) {
                if (callback) callback(result);
            } else {
                devices[i].getSerial(function (err, serial) {
                    result.push(serial);
                    i += 1;
                    finder();
                });
            }
        };

        finder();
    }
function (callback) {
        var result = [];

        var devices = findBlinkSticks();
        var i = 0;

        var finder = function() {

            if (i == devices.length) {
                if (callback) callback(result);
            } else {
                devices[i].getSerial(function (err, serial) {
                    result.push(serial);
                    i += 1;
                    finder();
                });
            }
        };

        finder();
    }
function ( callback ) { var result = [ ] ; var devices = findBlinkSticks ( ) ; var i = 0 ; var finder = function ( ) { if ( i == devices . length ) { if ( callback ) callback ( result ) ; } else { devices [ i ] . getSerial ( function ( err , serial ) { result . push ( serial ) ; i += 1 ; finder ( ) ; } ) ; } } ; finder ( ) ; }
Returns the serial numbers of all attached BlinkStick devices.

@static
@method findAllSerials
@param {Function} callback Callback when all serials have been collected
@return {Array} Serial numbers.
Returns the serial numbers of all attached BlinkStick devices .