@isentinel/eslint-plugin-comment-length
Version:
18 lines • 668 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isAnotherWrapPointComing = void 0;
const is_punctuation_1 = require("./is-punctuation");
function isAnotherWrapPointComing(currentLength, maxLength, wordsToCome) {
for (const word of wordsToCome) {
if ((0, is_punctuation_1.isPunctuation)(word.at(-1)) && word.length > 1) {
return true;
}
currentLength += word.length + 1;
if (currentLength >= maxLength) {
return false;
}
}
return false;
}
exports.isAnotherWrapPointComing = isAnotherWrapPointComing;
//# sourceMappingURL=is-another-wrap-point-coming.js.map