<commit_before>var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var DefaultRoute = Router.DefaultRoute;
var NotFoundRoute = Router.NotFoundRoute;

var App = require('./pages/app.jsx');
var NotFound = require('./pages/notFound.jsx');

var Board = require('./components/rdb-board.jsx');

var utils = require('rdbutils');
var boards = require('rdbconf').boards;
var BoardFactory = require('./factories/rdb-board-factory.jsx');

var dynamicRoutes = boards.map(function(board,i){
  var boardName = board.name,
    boardUrl = utils.boardNameToUrl(boardName),
    Board = BoardFactory.create(board);
  
  return <Route key={'route-' + i} name={ boardUrl } handler={Board} />
});

var routes = (
  <Route name="app" path="/" handler={App}>
    { dynamicRoutes }
    <DefaultRoute handler={BoardFactory.create(boards[0])}/>
    <NotFoundRoute handler={NotFound}/>
  </Route>
);

module.exports = routes;<commit_msg>use es6 assignments<commit_after>var React = require('react');
var Router = require('react-router');
var { Route, DefaultRoute, NotFoundRoute } = Router;

var App = require('./pages/app.jsx');
var NotFound = require('./pages/notFound.jsx');

var Board = require('./components/rdb-board.jsx');

var utils = require('rdbutils');
var boards = require('rdbconf').boards;
var BoardFactory = require('./factories/rdb-board-factory.jsx');

var dynamicRoutes = boards.map(function(board,i){
  var boardName = board.name,
    boardUrl = utils.boardNameToUrl(boardName),
    Board = BoardFactory.create(board);
  
  return <Route key={ 'route-' + i } name={ boardUrl } handler={ Board } />
});

var routes = (
  <Route name="app" path="/" handler={ App }>
    { dynamicRoutes }
    <DefaultRoute handler={ BoardFactory.create(boards[0]) }/>
    <NotFoundRoute handler={ NotFound }/>
  </Route>
);

module.exports = routes;
{'fraction_non_alphanumeric': 0.17122920021470747, 'fraction_numerical': 0.001610305958132045, 'mean_word_length': 4.682926829268292, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4854755', 'n_tokens_mistral': 587, 'n_tokens_neox': 588, 'n_words': 130}