isSingleLineString.cjs 413 B

12345678910111213141516
  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. /**
  5. * Check if a string is a single line (i.e. does not contain
  6. * any newline characters).
  7. *
  8. * @param {string} input
  9. * @returns {boolean}
  10. */
  11. function isSingleLineString(input) {
  12. return !/[\n\r]/.test(input);
  13. }
  14. module.exports = isSingleLineString;