function gatherChanges(table, pokemonMapping) {
	// init items
	var items = table.querySelectorAll('tr');
	// ret.
	var data = [];

	// gather data
	for (var i = 1; i < items.length; i++) {
		var row = buildChangesItem(items[i]);
		// validate
		if (!(row.pokemon in pokemonMapping)) {
			throw new Error('Unknown pokemon: ' + row.pokemon);
		}
		// append index
		row.pokedex = pokemonMapping[row.pokemon]
		data.push(row);
	}
	return data;
}
/**
	Gather changes in given table.
*/
Gather changes in given table.
Gather changes in given table .
function gatherChanges(table, pokemonMapping) {
	var items = table.querySelectorAll('tr');
	var data = [];
	for (var i = 1; i < items.length; i++) {
		var row = buildChangesItem(items[i]);
		if (!(row.pokemon in pokemonMapping)) {
			throw new Error('Unknown pokemon: ' + row.pokemon);
		}
		row.pokedex = pokemonMapping[row.pokemon]
		data.push(row);
	}
	return data;
}
function gatherChanges ( table , pokemonMapping ) { var items = table . querySelectorAll ( 'tr' ) ; var data = [ ] ; for ( var i = 1 ; i < items . length ; i ++ ) { var row = buildChangesItem ( items [ i ] ) ; if ( ! ( row . pokemon in pokemonMapping ) ) { throw new Error ( 'Unknown pokemon: ' + row . pokemon ) ; } row . pokedex = pokemonMapping [ row . pokemon ] data . push ( row ) ; } return data ; }
Gather changes in given table.
Gather changes in given table .
// init items // ret. // gather data // validate // append index