function hasNewline(text, startIndex, options = {}) {
  const idx = skipSpaces(
    text,
    options.backwards ? startIndex - 1 : startIndex,
    options,
  );
  const idx2 = skipNewline(text, idx, options);
  return idx !== idx2;
}
@param {string} text
@param {number} startIndex
@param {SkipOptions=} options
@returns {boolean}