hasEmptyLine.cjs 485 B

12345678910111213141516171819
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. const HAS_EMPTY_LINE = /\n[\r\t ]*\n/;
  5. /**
  6. * Check if a string contains at least one empty line
  7. *
  8. * @param {string | undefined} string
  9. * @returns {boolean}
  10. */
  11. function hasEmptyLine(string) {
  12. if (string === '' || string === undefined) return false;
  13. return HAS_EMPTY_LINE.test(string);
  14. }
  15. module.exports = hasEmptyLine;