lib/utils/indent-common.js
function isBeginningOfLine (node, index, nodes) {
  if (node != null) {
    for (let i = index - 1; i >= 0; --i) {
      const prevNode = nodes[i]
      if (prevNode == null) {
        continue
      }

      return node.loc.start.line !== prevNode.loc.end.line
    }
  }
  return false
}
function isBeginningOfLine (node, index, nodes) {
  if (node != null) {
    for (let i = index - 1; i >= 0; --i) {
      const prevNode = nodes[i]
      if (prevNode == null) {
        continue
      }

      return node.loc.start.line !== prevNode.loc.end.line
    }
  }
  return false
}
function isBeginningOfLine ( node , index , nodes ) { if ( node != null ) { for ( let i = index - 1 ; i >= 0 ; -- i ) { const prevNode = nodes [ i ] if ( prevNode == null ) { continue } return node . loc . start . line !== prevNode . loc . end . line } } return false }
Check whether the node is at the beginning of line.
@param {Node} node The node to check.
@param {number} index The index of the node in the nodes.
@param {Node[]} nodes The array of nodes.
@returns {boolean} `true` if the node is at the beginning of line.
Check whether the node is at the beginning of line .