lib/config-generator.js
function(ast) {
        var self = this;

        var found;
        var meta = ast;
        var values = {};

        jsstana.traverse(ast, function(node) {
            if (!found) {
                var match = jsstana.match('(ident META)', node);

                if (match) {
                    jsstana.traverse(meta, function(node) {
                        if (!found) {
                            match = jsstana.match('(return)', node) || jsstana.match('(object)', node);

                            if (match) {
                                values = self._extractObjectValues(['path', 'fullPath', 'condition', 'group'], node);

                                found = true;
                            }
                        }
                    });

                } else {
                    meta = node;
                }
            }
        });

        return values;
    }
function(ast) {
        var self = this;

        var found;
        var meta = ast;
        var values = {};

        jsstana.traverse(ast, function(node) {
            if (!found) {
                var match = jsstana.match('(ident META)', node);

                if (match) {
                    jsstana.traverse(meta, function(node) {
                        if (!found) {
                            match = jsstana.match('(return)', node) || jsstana.match('(object)', node);

                            if (match) {
                                values = self._extractObjectValues(['path', 'fullPath', 'condition', 'group'], node);

                                found = true;
                            }
                        }
                    });

                } else {
                    meta = node;
                }
            }
        });

        return values;
    }
function ( ast ) { var self = this ; var found ; var meta = ast ; var values = { } ; jsstana . traverse ( ast , function ( node ) { if ( ! found ) { var match = jsstana . match ( '(ident META)' , node ) ; if ( match ) { jsstana . traverse ( meta , function ( node ) { if ( ! found ) { match = jsstana . match ( '(return)' , node ) || jsstana . match ( '(object)' , node ) ; if ( match ) { values = self . _extractObjectValues ( [ 'path' , 'fullPath' , 'condition' , 'group' ] , node ) ; found = true ; } } } ) ; } else { meta = node ; } } } ) ; return values ; }
Extracts conditions from a module configuration.

@method _extractCondition
@protected
@param {Object} ast AST to be processed
@return {Object} The extracted values for the conditional options
Extracts conditions from a module configuration .