cordova/mpdjs/jsbuild/r.js
function traverse(object, visitor) {
        var child;

        if (!object) {
            return;
        }

        if (visitor.call(null, object) === false) {
            return false;
        }
        for (var i = 0, keys = Object.keys(object); i < keys.length; i++) {
            child = object[keys[i]];
            if (typeof child === 'object' && child !== null) {
                if (traverse(child, visitor) === false) {
                    return false;
                }
            }
        }
    }
function traverse(object, visitor) {
        var child;

        if (!object) {
            return;
        }

        if (visitor.call(null, object) === false) {
            return false;
        }
        for (var i = 0, keys = Object.keys(object); i < keys.length; i++) {
            child = object[keys[i]];
            if (typeof child === 'object' && child !== null) {
                if (traverse(child, visitor) === false) {
                    return false;
                }
            }
        }
    }
function traverse ( object , visitor ) { var child ; if ( ! object ) { return ; } if ( visitor . call ( null , object ) === false ) { return false ; } for ( var i = 0 , keys = Object . keys ( object ) ; i < keys . length ; i ++ ) { child = object [ keys [ i ] ] ; if ( typeof child === 'object' && child !== null ) { if ( traverse ( child , visitor ) === false ) { return false ; } } } }
From an esprima example for traversing its ast.
From an esprima example for traversing its ast .