code: function isPure(node, parentIsPure) {
    switch (node.type) {
      // Computed members might invoke a stateful toString()
      case AST.MemberExpression:
        if (node.computed) {
          return false;
        }
        break;
  
      // Unary always convert to primative
      case AST.UnaryExpression:
        return PURITY_ABSOLUTE;
  
      // The binary + operator can invoke a stateful toString().
      case AST.BinaryExpression:
        return node.operator !== '+' ? PURITY_ABSOLUTE : false;
  
      // Functions / filters probably read state from within objects
      case AST.CallExpression:
        return false;
    }
  
    return (undefined === parentIsPure) ? PURITY_RELATIVE : parentIsPure;
  }
docs: Detect nodes which could depend on non-shallow state of objects