lib/index.js
function isPaddedArgument (node) {
        var parentArray = node.parent().arguments ? node.parent().arguments : node.parent().elements
        var idx = parentArray.indexOf(node)
        if (idx === 0) { // first arg
          if (prePreChar === '(' && preChar === '(' && postChar === ')') { // already padded
            return true
          }
        } else if (idx === parentArray.length - 1) { // last arg
          if (preChar === '(' && postChar === ')' && postPostChar === ')') { // already padded
            return true
          }
        } else { // middle arg
          if (preChar === '(' && postChar === ')') { // already padded
            return true
          }
        }
        return false
      }
function isPaddedArgument (node) {
        var parentArray = node.parent().arguments ? node.parent().arguments : node.parent().elements
        var idx = parentArray.indexOf(node)
        if (idx === 0) { // first arg
          if (prePreChar === '(' && preChar === '(' && postChar === ')') { // already padded
            return true
          }
        } else if (idx === parentArray.length - 1) { // last arg
          if (preChar === '(' && postChar === ')' && postPostChar === ')') { // already padded
            return true
          }
        } else { // middle arg
          if (preChar === '(' && postChar === ')') { // already padded
            return true
          }
        }
        return false
      }
function isPaddedArgument ( node ) { var parentArray = node . parent ( ) . arguments ? node . parent ( ) . arguments : node . parent ( ) . elements var idx = parentArray . indexOf ( node ) if ( idx === 0 ) { // first arg if ( prePreChar === '(' && preChar === '(' && postChar === ')' ) { // already padded return true } } else if ( idx === parentArray . length - 1 ) { // last arg if ( preChar === '(' && postChar === ')' && postPostChar === ')' ) { // already padded return true } } else { // middle arg if ( preChar === '(' && postChar === ')' ) { // already padded return true } } return false }
assuming this node is an argument to a function or an element in an array, return true if it itself is already padded with parentheses
assuming this node is an argument to a function or an element in an array return true if it itself is already padded with parentheses