src/compiler/visitors/visitor.js
function normalizeFns(fns) {
  Object.keys(fns).forEach(function(key) {
    var handler = fns[key];
    if (typeof handler === 'function') {
      fns[key] = {
        enter: handler,
        leave: noop
      };
    }
  });
}
function normalizeFns(fns) {
  Object.keys(fns).forEach(function(key) {
    var handler = fns[key];
    if (typeof handler === 'function') {
      fns[key] = {
        enter: handler,
        leave: noop
      };
    }
  });
}
function normalizeFns ( fns ) { Object . keys ( fns ) . forEach ( function ( key ) { var handler = fns [ key ] ; if ( typeof handler === 'function' ) { fns [ key ] = { enter : handler , leave : noop } ; } } ) ; }
visit can be an object with enter leave or a function if it is a function, run this on enter
visit can be an object with enter leave or a function if it is a function run this on enter