function getLine(line, cst) {
  var _getSrcInfo2 = getSrcInfo(cst),
      lineStarts = _getSrcInfo2.lineStarts,
      src = _getSrcInfo2.src;

  if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null;
  var start = lineStarts[line - 1];
  var end = lineStarts[line]; // undefined for last line; that's ok for slice()

  while (end && end > start && src[end - 1] === '\n') {
    --end;
  }

  return src.slice(start, end);
}
Get a specified line from the source.

Accepts a source string or a CST document as the second parameter. With
the latter, starting indices for lines are cached in the document as
`lineStarts: number[]`.

Returns the line as a string if found, or `null` otherwise.

@param {number} line One-indexed line number
@param {string|Document|Document[]} cst
@returns {?string}