import { __require as requireStrip } from './strip.mjs';

var lines;
var hasRequiredLines;
function requireLines() {
  if (hasRequiredLines) return lines;
  hasRequiredLines = 1;
  const strip = requireStrip();
  /**
   * @param {string} msg
   * @param {number} perLine
   */

  lines = function (msg, perLine) {
    let lines = String(strip(msg) || '').split(/\r?\n/);
    if (!perLine) return lines.length;
    return lines.map(l => Math.ceil(l.length / perLine)).reduce((a, b) => a + b);
  };
  return lines;
}

export { requireLines as __require };
