UNPKG

@stylistic/stylelint-plugin

Version:
9 lines (8 loc) 299 B
/** * Checks if a string is a single line (i.e. does not contain any newline characters). * @param {string} input - The string to check. * @returns {boolean} True if the string is a single line, false otherwise. */ export function isSingleLineString (input) { return !(/[\n\r]/u).test(input) }