!foo ? 'foo' : 'bar' -> foo ? 'bar' : 'foo' foo !== 'lol' ? 'foo' : 'bar' -> foo === 'lol' ? 'bar' : 'foo'
334724
function flipIfOrConditional(path) {
            const { node } = path;
            if (!path.get("test").isLogicalExpression()) {
              flipNegation(node);
              return;
            }

            if (flipExpressions.shouldFlip(node.test)) {
              node.test = flipExpressions.flip(node.test);
              [node.alternate, node.consequent] = [
                node.consequent,
                node.alternate
              ];
            }
          }
1071795
function detectQuote(str) {
	if (str == null || str.length == 0) return false;
	var first = str.charAt(0);
	var last = str.charAt(str.length - 1);
	if (first != last) return false;
	if (first == map.single) return map.single;
	if (first == map.double) return map.double;
	return false;
}
1354503
function assertEquals(assert, actual, expected, message) {
  const assertionType = Symbol.for('@@meta:magical:assertion-type');
  const rest          = Symbol.for('@@meta:magical:assertion-rest');
  const keys          = Object.keys;

  function isSetoid(value) {
    return value
    &&     typeof value.equals === 'function';
  }

  function isRecord(value) {
    return value
    &&     value[assertionType] === 'record';
  }

  function check(predicate, ...values) {
    return values.every(predicate);
  }

  function getSpecialArrayLength(array) {
    const rests = array.map((x, i) => [x, i]).filter(pair => pair[0] === rest);
    if (rests.length > 1 || (rests[0] && rests[0][1] !== array.length - 1)) {
      assert.ok(false, `${message}. Assertions only support a single trailing rest indication for arrays currently.`);
    }
    return (rests[0] || [null, array.length])[1];
  }

  function compareArrays(left, right) {
    const expectedLength = getSpecialArrayLength(right);
    assert.ok(Array.isArray(left), `${message}. The LHS is not an array.`);
    if (left.length < expectedLength) {
      assert.ok(false, `${message}. The LHS does not have the minimum expected length (${left.length} < ${expectedLength})`);
    }
    for (let i = 0; i < expectedLength; ++i) {
      compare(left[i], right[i]);
    }
  }

  function compareRecord(left, right) {
    const isPartial = right[rest];
    assert.ok(Object(left) === left, message);
    if (!isPartial) {
      assert.deepStrictEqual(keys(left).sort(), keys(right).sort(), `${message}. The objects have different keys ([${keys(left).sort().join(', ')}] vs. [${keys(right).sort().join(', ')}])`);
    }
    Object.keys(right).forEach(key => {
      if (!(key in left)) {
        assert.ok(false, `${message}. The expected key ${key} is not present in the actual object.`);
      }
      compare(left[key], right[key]);
    });
  }


  function compare(l, r) {
    return check(isSetoid, l, r)  ?  assert.ok(l.equals(r), `${message}. The LHS (${l}) setoid instance says the LHS and RHS (${r}) are not equal.`)
    :      Array.isArray(r)       ?  compareArrays(l, r)
    :      isRecord(r)            ?  compareRecord(l, r)
    :      /* otherwise */           assert.deepStrictEqual(l, r, `${message}. The LHS (${l}) and the RHS (${r}) are not structually equal.`);
  }

  compare(actual, expected);
}
757854
function(a, b) {
    a = a || {};
    b = b || {};
    return a.name === b.name && angular.equals(a.params, b.params);
  }
905668
def equals?(other)
      if other.is_a?(CF::Base)
        @ptr.address == other.to_ptr.address
      else
        false
      end
    end
1173287
function (type, exp1, exp2) {
      var result;

      switch (type) {
        case '=':
          result = (exp1 === exp2);
          break;

        case '>':
          result = (exp1 > exp2);
          break;

        case '<':
          result = (exp1 < exp2);
          break;

        case '>=':
          result = (exp1 >= exp2);
          break;

        case '<=':
          result = (exp1 === exp2);
          break;

        case '<>':
          result = (exp1 != exp2);
          break;

        case 'NOT':
          result = (exp1 != exp2);
          break;
      }

      return result;
    }
304538
function coerce(val) {
	if ('string' != typeof val) return val;

	// regexp
	if ('/' == val[0]) {
		val = val.slice(1, -1);
		return new RegExp(val);
	}

	// boolean
	switch (val) {
		case 'true':
		case 'yes':
			return true;
		case 'false':
		case 'no':
			return false;
	}

	// quoted
	if (quoted(val)) return strip(val);

	// pattern
	if (~val.indexOf('*')) return pattern(val);

	// term
	return val;
}
998821
function (actualArgs, expectedArgs) {
    var i;
    if (actualArgs.length !== expectedArgs.length) {
      return false;
    }
    for (i = 0; i < expectedArgs.length; i++) {
      if (actualArgs[i] !== expectedArgs[i]) {
        return false;
      }
    }
    return true;
  }
1048059
function M(a, b) {
	var e = Expression(a, b || M.Global);
	return e;
}
713856
function boolMatch(s, matchers) {
    var i, matcher, down = s.toLowerCase();
    matchers = [].concat(matchers);
    for (i = 0; i < matchers.length; i += 1) {
      matcher = matchers[i];
      if (!matcher) continue;
      if (matcher.test && matcher.test(s)) return true;
      if (matcher.toLowerCase() === down) return true;
    }
  }
538779
function(v1, v2, e1, e2) {
        return !((e1 < v1 && e2 < v1) || (e1 > v2 && e2 > v2));
    }
1000935
def _impl(lexer):
    """"""
    p = _sumterm(lexer)

    tok = next(lexer)
    # SUMTERM '=>' IMPL
    if isinstance(tok, OP_rarrow):
        q = _impl(lexer)
        return ('implies', p, q)
    # SUMTERM '<=>' IMPL
    elif isinstance(tok, OP_lrarrow):
        q = _impl(lexer)
        return ('equal', p, q)
    # SUMTERM
    else:
        lexer.unpop_token(tok)
        return p
284596
def =~(other)
      other = coerce( other )
      return (other and 
              self.name == other.name and
              self.version.to_s == other.version.to_s and
              self.platform_string == other.platform_string )
    end
10826
function sameLength(a, b) {
    return typeof a === typeof b &&
      a && b &&
      a.length === b.length;
  }
847875
def otherwise(first, second)
      first = first.to_s
      first.empty? ? second : first
    end
1123924
function string2Boolean (string, defaultTrue) {
  // console.log('2bool:', String(string).toLowerCase());
  switch (String(string).toLowerCase()) {
    case '':
      return (defaultTrue === undefined) ? false : defaultTrue;
    case 'true':
    case '1':
    case 'yes':
    case 'y':
      return true;
    case 'false':
    case '0':
    case 'no':
    case 'n':
      return false;
    default:
      // you could throw an error, but 'undefined' seems a more logical reply
      return undefined;
  }
}
567992
private boolean twoMoreSingleQuotes() throws IOException
    {
        int c = read();
        if (c == '\'') {
            int c2 = read();
            if (c2 == '\'') {
                return true;
            }
            unread(c2);
        }
        unread(c);
        return false;
    }