index.js
function extract(selectorText) {
    var attr = 0,
        sels = [],
        sel = '',
        i,
        c,
        l = selectorText.length;

    for (i = 0; i < l; i++) {
        c = selectorText.charAt(i);

        if (attr) {
            if (c === '[' || c === '(') {
                attr--;
            }
            sel += c;
        } else if (c === ',') {
            sels.push(sel);
            sel = '';
        } else {
            if (c === '[' || c === '(') {
                attr++;
            }
            if (sel.length || (c !== ',' && c !== '\n' && c !== ' ')) {
                sel += c;
            }
        }
    }

    if (sel.length) {
        sels.push(sel);
    }

    return sels;
}
function extract(selectorText) {
    var attr = 0,
        sels = [],
        sel = '',
        i,
        c,
        l = selectorText.length;

    for (i = 0; i < l; i++) {
        c = selectorText.charAt(i);

        if (attr) {
            if (c === '[' || c === '(') {
                attr--;
            }
            sel += c;
        } else if (c === ',') {
            sels.push(sel);
            sel = '';
        } else {
            if (c === '[' || c === '(') {
                attr++;
            }
            if (sel.length || (c !== ',' && c !== '\n' && c !== ' ')) {
                sel += c;
            }
        }
    }

    if (sel.length) {
        sels.push(sel);
    }

    return sels;
}
function extract ( selectorText ) { var attr = 0 , sels = [ ] , sel = '' , i , c , l = selectorText . length ; for ( i = 0 ; i < l ; i ++ ) { c = selectorText . charAt ( i ) ; if ( attr ) { if ( c === '[' || c === '(' ) { attr -- ; } sel += c ; } else if ( c === ',' ) { sels . push ( sel ) ; sel = '' ; } else { if ( c === '[' || c === '(' ) { attr ++ ; } if ( sel . length || ( c !== ',' && c !== '\n' && c !== ' ' ) ) { sel += c ; } } } if ( sel . length ) { sels . push ( sel ) ; } return sels ; }
Returns an array of the selectors.

@license Sizzle CSS Selector Engine - MIT
@param {String} selectorText from cssom
@api public
Returns an array of the selectors .