epiphany/node_modules/stylelint/lib/utils/hasEmptyLine.js
2023-12-09 22:48:07 -08:00

15 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);
};