basant307/AI_Governance_Project
048
1'use strict';2 3const strip = require('./strip');4/**5 * @param {string} msg6 * @param {number} perLine7 */8 9 10module.exports = function (msg, perLine) {11 let lines = String(strip(msg) || '').split(/\r?\n/);12 if (!perLine) return lines.length;13 return lines.map(l => Math.ceil(l.length / perLine)).reduce((a, b) => a + b);14};