source/models/menu-tree.js
function findItem( path, items ) {
  var result = null;
  items.forEach( function ( item ) {
    if (!result && item instanceof MenuItem && item.paths.filter( function( value ) {
        return value === path;
      } ).length > 0)
      result = item;
    if (!result && item instanceof MenuNode) {
      var child = findItem( path, item.children );
      if (child)
        result = child;
    }
  } );
  return result;
}
function findItem( path, items ) {
  var result = null;
  items.forEach( function ( item ) {
    if (!result && item instanceof MenuItem && item.paths.filter( function( value ) {
        return value === path;
      } ).length > 0)
      result = item;
    if (!result && item instanceof MenuNode) {
      var child = findItem( path, item.children );
      if (child)
        result = child;
    }
  } );
  return result;
}
function findItem ( path , items ) { var result = null ; items . forEach ( function ( item ) { if ( ! result && item instanceof MenuItem && item . paths . filter ( function ( value ) { return value === path ; } ) . length > 0 ) result = item ; if ( ! result && item instanceof MenuNode ) { var child = findItem ( path , item . children ) ; if ( child ) result = child ; } } ) ; return result ; }
region Helper methods
region Helper methods