Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / nextNonCommentNode.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/nextNonCommentNode.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/nextNonCommentNode.js
new file mode 100644 (file)
index 0000000..411ee32
--- /dev/null
@@ -0,0 +1,18 @@
+/* @flow */
+"use strict";
+
+/**
+ * Get the next non-comment node in a PostCSS AST
+ * at or after a given node.
+ */
+module.exports = function nextNonCommentNode(
+  startNode /*: Object*/
+) /*: ?Object*/ {
+  if (!startNode || !startNode.next) return null;
+
+  if (startNode.type === "comment") {
+    return nextNonCommentNode(startNode.next());
+  }
+
+  return startNode;
+};