text: var lineChomper = require('line-chomper');
  var jsonfile = require('jsonfile');
  var probable = require('probable');
  var callNextTick = require('call-next-tick');
  
  function getLine(done) {
    var lineOffsets = jsonfile.readFileSync(__dirname + '/data/quotes-offsets.json');
    var offsetToGet = probable.pickFromArray(lineOffsets);
  
    lineChomper.chomp(
      __dirname + '/data/quotes_all.csv',
      {
        lineOffsets: lineOffsets,
        fromLine: offsetToGet.line,
        lineCount: 1
      },
      passLine
    );
  
    function passLine(error, lines) {
      var line;
      if (error) {
        done(error);
      }
      else if (!lines || !Array.isArray(lines) || lines.length < 1) {
        done(new Error('Could not get valid line for offset ' + offsetToGet));
      }
      else {
        line = lines[0];
        done(error, line);
      }
    }
  }
  
  function getRandomQuote(done) {
    getLine(parseLine);
  
    function parseLine(error, line) {
      if (error) {
        done(error);
      }
      else {
        var parts = line.split(';');
        var quote = {
          text: parts[0],
          author: parts[1]
        }
        done(error, quote);
      }
    }
  }
  
  module.exports = getRandomQuote;
  