function flattenRouteConfigs(config) {
  let flattened = [];
  for (let i = 0; i < config.length; i++) {
    // is a directory
    if (config[i].items) {
      flattened = flattened.concat(flattenRouteConfigs(config[i].items));
    }
    // is a demo
    else {
      flattened.push(config[i].currPath);
    }
  }
  return flattened;
}
/**
 * Takes the route config object and flattens it for use in the sidebar
 * @param {Array<Object>} config the nested route config object in order
 * @returns {Array<String>} the flattened route config object
 */
Takes the route config object and flattens it for use in the sidebar
@param {Array} config the nested route config object in order
@returns {Array} the flattened route config object
Takes the route config object and flattens it for use in the sidebar @param { Array } config the nested route config object in order @returns { Array } the flattened route config object
function flattenRouteConfigs(config) {
  let flattened = [];
  for (let i = 0; i < config.length; i++) {
    if (config[i].items) {
      flattened = flattened.concat(flattenRouteConfigs(config[i].items));
    }
    else {
      flattened.push(config[i].currPath);
    }
  }
  return flattened;
}
function flattenRouteConfigs ( config ) { let flattened = [ ] ; for ( let i = 0 ; i < config . length ; i ++ ) { if ( config [ i ] . items ) { flattened = flattened . concat ( flattenRouteConfigs ( config [ i ] . items ) ) ; } else { flattened . push ( config [ i ] . currPath ) ; } } return flattened ; }
Takes the route config object and flattens it for use in the sidebar
 @param {Array<Object>} config the nested route config object in order
 @returns {Array<String>} the flattened route config object
Takes the route config object and flattens it for use in the sidebar @param { Array<Object > } config the nested route config object in order @returns { Array<String > } the flattened route config object
// is a directory // is a demo