third_party/es6-module-loader/system.js
function traverse(object, iterator, parent, parentProperty) {
        var key, child;
        if (iterator(object, parent, parentProperty) === false)
          return;
        for (key in object) {
          if (!object.hasOwnProperty(key))
            continue;
          if (key == 'location' || key == 'type')
            continue;
          child = object[key];
          if (typeof child == 'object' && child !== null)
            traverse(child, iterator, object, key);
        }
      }
function traverse(object, iterator, parent, parentProperty) {
        var key, child;
        if (iterator(object, parent, parentProperty) === false)
          return;
        for (key in object) {
          if (!object.hasOwnProperty(key))
            continue;
          if (key == 'location' || key == 'type')
            continue;
          child = object[key];
          if (typeof child == 'object' && child !== null)
            traverse(child, iterator, object, key);
        }
      }
function traverse ( object , iterator , parent , parentProperty ) { var key , child ; if ( iterator ( object , parent , parentProperty ) === false ) return ; for ( key in object ) { if ( ! object . hasOwnProperty ( key ) ) continue ; if ( key == 'location' || key == 'type' ) continue ; child = object [ key ] ; if ( typeof child == 'object' && child !== null ) traverse ( child , iterator , object , key ) ; } }
tree traversal, NB should use visitor pattern here
tree traversal NB should use visitor pattern here