src/language/CSSUtils.js
function extractAllNamedFlows(text) {
        var namedFlowRegEx = /(?:flow\-(into|from)\:\s*)([\w\-]+)(?:\s*;)/gi,
            result = [],
            names = {},
            thisMatch;

        // Reduce the content so that matches
        // inside strings and comments are ignored
        text = reduceStyleSheetForRegExParsing(text);

        // Find the first match
        thisMatch = namedFlowRegEx.exec(text);

        // Iterate over the matches and add them to result
        while (thisMatch) {
            var thisName = thisMatch[2];

            if (IGNORED_FLOW_NAMES.indexOf(thisName) === -1 && !names.hasOwnProperty(thisName)) {
                names[thisName] = result.push(thisName);
            }
            thisMatch = namedFlowRegEx.exec(text);
        }

        return result;
    }
function extractAllNamedFlows(text) {
        var namedFlowRegEx = /(?:flow\-(into|from)\:\s*)([\w\-]+)(?:\s*;)/gi,
            result = [],
            names = {},
            thisMatch;

        // Reduce the content so that matches
        // inside strings and comments are ignored
        text = reduceStyleSheetForRegExParsing(text);

        // Find the first match
        thisMatch = namedFlowRegEx.exec(text);

        // Iterate over the matches and add them to result
        while (thisMatch) {
            var thisName = thisMatch[2];

            if (IGNORED_FLOW_NAMES.indexOf(thisName) === -1 && !names.hasOwnProperty(thisName)) {
                names[thisName] = result.push(thisName);
            }
            thisMatch = namedFlowRegEx.exec(text);
        }

        return result;
    }
function extractAllNamedFlows ( text ) { var namedFlowRegEx = / (?:flow\-(into|from)\:\s*)([\w\-]+)(?:\s*;) / gi , result = [ ] , names = { } , thisMatch ; // Reduce the content so that matches // inside strings and comments are ignored text = reduceStyleSheetForRegExParsing ( text ) ; // Find the first match thisMatch = namedFlowRegEx . exec ( text ) ; // Iterate over the matches and add them to result while ( thisMatch ) { var thisName = thisMatch [ 2 ] ; if ( IGNORED_FLOW_NAMES . indexOf ( thisName ) === - 1 && ! names . hasOwnProperty ( thisName ) ) { names [ thisName ] = result . push ( thisName ) ; } thisMatch = namedFlowRegEx . exec ( text ) ; } return result ; }
Extracts all named flow instances
@param {!string} text to extract from
@return {Array.<string>} array of unique flow names found in the content (empty if none)
Extracts all named flow instances