hasEmptyLine.js 276 B

12345678910111213
  1. 'use strict';
  2. /**
  3. * Check if a string contains at least one empty line
  4. *
  5. * @param {string | undefined} string
  6. * @returns {boolean}
  7. */
  8. module.exports = function (string) {
  9. if (string === '' || string === undefined) return false;
  10. return /\n[\r\t ]*\n/.test(string);
  11. };