dist/scripts/vendor.min.js
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;
}
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;
}
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 ; }
Detect nodes which could depend on non-shallow state of objects
Detect nodes which could depend on non - shallow state of objects