mirror of
https://github.com/thangisme/notes.git
synced 2025-11-23 13:12:25 -05:00
Initial commit
This commit is contained in:
18
node_modules/stylelint/lib/utils/isOnlyWhitespace.js
generated
vendored
Normal file
18
node_modules/stylelint/lib/utils/isOnlyWhitespace.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/* @flow */
|
||||
"use strict"
|
||||
|
||||
const isWhitespace = require("./isWhitespace")
|
||||
|
||||
/**
|
||||
* Returns a Boolean indicating whether the the input string is only whitespace.
|
||||
*/
|
||||
module.exports = function (input/*: string*/)/*: boolean*/ {
|
||||
let isOnlyWhitespace = true
|
||||
for (let i = 0, l = input.length; i < l; i++) {
|
||||
if (!isWhitespace(input[i])) {
|
||||
isOnlyWhitespace = false
|
||||
break
|
||||
}
|
||||
}
|
||||
return isOnlyWhitespace
|
||||
}
|
||||
Reference in New Issue
Block a user