build-structure.js
function loadKeyValueCSV (filename, callback) {
  var out = {}

  csv()
  .from.path(filename, {
    delimiter: '\t'
  })
  .on('record', function (data, index) {
    if (data[0].match(/^[\w\d]/)) {
      out[data[0]] = data[1]
    }
  })
  .on('end', function (count) {
    callback(null, out)
  })
  .on('error', function (err) {
    callback(err)
  })
}
function loadKeyValueCSV (filename, callback) {
  var out = {}

  csv()
  .from.path(filename, {
    delimiter: '\t'
  })
  .on('record', function (data, index) {
    if (data[0].match(/^[\w\d]/)) {
      out[data[0]] = data[1]
    }
  })
  .on('end', function (count) {
    callback(null, out)
  })
  .on('error', function (err) {
    callback(err)
  })
}
function loadKeyValueCSV ( filename , callback ) { var out = { } csv ( ) . from . path ( filename , { delimiter : '\t' } ) . on ( 'record' , function ( data , index ) { if ( data [ 0 ] . match ( / ^[\w\d] / ) ) { out [ data [ 0 ] ] = data [ 1 ] } } ) . on ( 'end' , function ( count ) { callback ( null , out ) } ) . on ( 'error' , function ( err ) { callback ( err ) } ) }
Loads key-value-pairs saved in a CSV file into
an object.

@param {String} filename to read from
@param {Function} callback that takes the object
Loads key - value - pairs saved in a CSV file into an object .