isSingleLineString.js 317 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports["default"] = _default;
  6. /**
  7. * Check if a string is a single line (i.e. does not contain
  8. * any newline characters).
  9. *
  10. * @param {string} input
  11. * @return {boolean}
  12. */
  13. function _default(input) {
  14. return !/[\n\r]/.test(input);
  15. }