securityos/node_modules/stylelint/lib/utils/hasEmptyLine.js

16 lines
328 B
JavaScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
'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);
};