.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / isOnlyWhitespace.js
1 /* @flow */
2 "use strict";
3
4 const isWhitespace = require("./isWhitespace");
5
6 /**
7  * Returns a Boolean indicating whether the the input string is only whitespace.
8  */
9 module.exports = function(input /*: string*/) /*: boolean*/ {
10   let isOnlyWhitespace = true;
11   for (let i = 0, l = input.length; i < l; i++) {
12     if (!isWhitespace(input[i])) {
13       isOnlyWhitespace = false;
14       break;
15     }
16   }
17   return isOnlyWhitespace;
18 };