function handleScheduleData(output, filter, cb) {
  var data = migrate
    .fromArray(output)
    .map(migrate.processOldItem);

  console.log('Before: ', data.length);

  data = help
    .unique(data)
    .map(function (entry) { entry.filter = filter; return entry; });

  console.log('Entries: ', data.length);
  console.log('Filter:', filter);

  return cb(null, data);
}
/**
 * Process schedule data into correct format
 * @param {Array}    output data parsed by csv
 * @param {String}   filter building id
 * @param {Function} cb
 */
Process schedule data into correct format
@param {Array}    output data parsed by csv
@param {String}   filter building id
@param {Function} cb
Process schedule data into correct format @param { Array } output data parsed by csv @param { String } filter building id @param { Function } cb
function handleScheduleData(output, filter, cb) {
  var data = migrate
    .fromArray(output)
    .map(migrate.processOldItem);
  console.log('Before: ', data.length);
  data = help
    .unique(data)
    .map(function (entry) { entry.filter = filter; return entry; });
  console.log('Entries: ', data.length);
  console.log('Filter:', filter);
  return cb(null, data);
}
function handleScheduleData ( output , filter , cb ) { var data = migrate . fromArray ( output ) . map ( migrate . processOldItem ) ; console . log ( 'Before: ' , data . length ) ; data = help . unique ( data ) . map ( function ( entry ) { entry . filter = filter ; return entry ; } ) ; console . log ( 'Entries: ' , data . length ) ; console . log ( 'Filter:' , filter ) ; return cb ( null , data ) ; }
Process schedule data into correct format
 @param {Array}    output data parsed by csv
 @param {String}   filter building id
 @param {Function} cb
Process schedule data into correct format @param { Array } output data parsed by csv @param { String } filter building id @param { Function } cb