16 lines
328 B
JavaScript
16 lines
328 B
JavaScript
'use strict';
|
|
|
|
const HAS_EMPTY_LINE = /\n[\r\t ]*\n/;
|
|
|
|
/**
|
|
* Check if a string contains at least one empty line
|
|
*
|
|
* @param {string | undefined} string
|
|
* @returns {boolean}
|
|
*/
|
|
module.exports = function hasEmptyLine(string) {
|
|
if (string === '' || string === undefined) return false;
|
|
|
|
return HAS_EMPTY_LINE.test(string);
|
|
};
|