mirror of
https://github.com/thangisme/notes.git
synced 2024-11-04 19:57:16 -05:00
14 lines
266 B
JavaScript
14 lines
266 B
JavaScript
/* @flow */
|
|
"use strict"
|
|
|
|
/**
|
|
* Check if a string is a single line (i.e. does not contain
|
|
* any newline characters).
|
|
*
|
|
* @param {string} input
|
|
* @return {boolean}
|
|
*/
|
|
module.exports = function (input/*: string*/)/*: boolean*/ {
|
|
return !/[\n\r]/.test(input)
|
|
}
|