4 const _ = require("lodash");
6 function getNodeLine(node /*:: ?: postcss$node*/) /*: number | void*/ {
7 return _.get(node, "source.start.line");
10 module.exports = function getNextNonSharedLineCommentNode(
11 node /*:: ?: postcss$node*/
12 ) /*: postcss$node | void*/ {
13 if (node === undefined) {
17 const nextNode = node.next();
19 if (_.get(nextNode, "type") !== "comment") {
24 getNodeLine(node) === getNodeLine(nextNode) ||
25 (nextNode !== undefined &&
26 getNodeLine(nextNode) === getNodeLine(nextNode.next()))
28 return getNextNonSharedLineCommentNode(nextNode);