mirror of
https://github.com/thangisme/notes.git
synced 2026-07-31 06:20:49 -04:00
Initial commit
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
/* @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)
|
||||
}
|
||||
Reference in New Issue
Block a user