.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / isOnlyWhitespace.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/isOnlyWhitespace.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/isOnlyWhitespace.js
new file mode 100644 (file)
index 0000000..5af4780
--- /dev/null
@@ -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;
+};