<commit_before>YUI.add("helpers", function(Y) {

    Y.namespace("Bridge");

    Y.Bridge.DIRECTIONS = ["N", "E", "S", "W"];

    Y.Bridge.LEVELS = [1, 2, 3, 4, 5, 6, 7];

    Y.Bridge.SUITS = ["C", "D", "H", "S", "NT"];

    Y.Bridge.CONTRACTS = Y.Array.reduce(Y.Bridge.LEVELS, [], function(result, level) {
        return result.concat(Y.Array.map(Y.Bridge.SUITS, function(suit) {
            return level + suit;
        }));
    });

    Y.Bridge.dealerPosition = function(dealer) {
        return Y.Array.indexOf(Y.Bridge.DIRECTIONS, dealer);
    };

    Y.Bridge.isContract = function(contract) {
        return Y.Array.indexOf(Y.Bridge.CONTRACTS, contract) !== -1;
    };

    Y.Bridge.isLevel = function(level) {
        return Y.Array.indexOf(Y.Bridge.CONTRACTS, parseInt(contract)) !== -1;
    };
<commit_msg>fixed bug in helpers<commit_after>YUI.add("helpers", function(Y) {

    Y.namespace("Bridge");

    Y.Bridge.DIRECTIONS = ["N", "E", "S", "W"];

    Y.Bridge.LEVELS = [1, 2, 3, 4, 5, 6, 7];

    Y.Bridge.SUITS = ["C", "D", "H", "S", "NT"];

    Y.Bridge.CONTRACTS = Y.Array.reduce(Y.Bridge.LEVELS, [], function(result, level) {
        return result.concat(Y.Array.map(Y.Bridge.SUITS, function(suit) {
            return level + suit;
        }));
    });

    Y.Bridge.dealerPosition = function(dealer) {
        return Y.Array.indexOf(Y.Bridge.DIRECTIONS, dealer);
    };

    Y.Bridge.isContract = function(contract) {
        return Y.Array.indexOf(Y.Bridge.CONTRACTS, contract) !== -1;
    };

    Y.Bridge.isLevel = function(level) {
        return Y.Array.indexOf(Y.Bridge.CONTRACTS, parseInt(level)) !== -1;
    };

{'fraction_non_alphanumeric': 0.19488428745432398, 'fraction_numerical': 0.010962241169305725, 'mean_word_length': 2.734090909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5441301', 'n_tokens_mistral': 645, 'n_tokens_neox': 586, 'n_words': 101}