// github.com/TheJaredWilcurt/css-selectors-to-js-array | Public Domain | v1.0.0

function selectorsToArray (css) {
    // Regex to detect @media ... {
    var mediaQ = /(?:@media.*?\{)/igm;
    // Check if the CSS contains any media queries
    if (mediaQ.test(css)) {
        // Remove all media queries, they are not selectors
        css = css.split(mediaQ).join('');
    }
    // Split the whole thing based on opening curly braces
    css = css.split("{");
    // Loop through the split in the most performant way possible
    for (var i = (css.length - 1); i >= 0; i--) {
        // Remove excess whitespace and split on the ending curly brace
        var splitEndBracket = css[i].trim().split("}");
        // If there was a ending curly brace grab the last item in the split array
        // I'm not sure if that .trim(); actually does anything here, but leaving it in case it fixes fringe cases.
        css[i] = splitEndBracket[splitEndBracket.length - 1] || css[i].trim();
        // If there are comma separated CSS selectors
        if (css[i].indexOf(',') > -1) {
            // Split based on comma separation
            css[i] = css[i].split(',')
            // Loop through the comma separated selectors performantly
            for (var j = (css[i].length - 1); j >= 0; j--) {
                // Remove excess white space from each selector
                css[i][j] = css[i][j].trim();
            }
            // Flatten the CSS array so it does not contain arrays within arrays
            // .me, .you, .everyone-we-know ==> [[".me", ".you", ".everyone-we-know"]] ==> [".me", ".you", ".everyone-we-know"]
            css = [].concat.apply([], css);
        }
        // One last remove whitespace (this does actually catch things)
        css[i] = css[i].trim();
    }

    // Remove the last property/value pair and ending closing brace
    // [".thing", "", "h1", "font-size: 20px;}"] ==> [".thing", "", "h1"]
    css.pop();

    // Remove any empty strings from the array
    // [".thing", "", "h1"] ==> [".thing", "h1"]
    css = css.filter(Boolean)

    // Return an array of CSS Selectors in the order they were in the CSS file with none removed/missing
    return(css);
}

@@ -72,17 +72,17 @@
  %7C v1.0.
-0
+1
 %0D%0A%0D%0Afunc
@@ -146,11 +146,20 @@
 dia 
-...
+(stuff) then
  %7B%0D%0A
@@ -198,16 +198,198 @@
 )/igm;%0D%0A
+    // Regex to detect //single line comments%0D%0A    var comment = /(?:%5C/%5C/.*?%5Cn)/ig;%0D%0A    // Regex to detext /* multi-line comments */%0D%0A    var comments = /(?:%5C/%5C*(.%7C%5Cn)*?%5C*%5C/)/igm;%0D%0A
     // C
@@ -568,24 +568,411 @@
 ');%0D%0A    %7D%0D%0A
+    // Check if the CSS contains single line comments%0D%0A    if (comment.test(css)) %7B%0D%0A        // Remove all comments, they are not selectors%0D%0A        css = css.split(comment).join('');%0D%0A    %7D%0D%0A    // Check if the CSS contains multi-line comments%0D%0A    if (comments.test(css)) %7B%0D%0A        // Remove all comments, they are not selectors%0D%0A        css = css.split(comments).join('');%0D%0A    %7D%0D%0A%0D%0A
     // Split
@@ -2691,24 +2691,59 @@
 Boolean)%0D%0A%0D%0A
+    var arrayOfSelectors = css;%0D%0A%0D%0A
     // Retur
@@ -2847,18 +2847,31 @@
  return(
-cs
+arrayOfSelector
 s);%0D%0A%7D%0D%0A

Update ven.selectorstoarray.js