<commit_before>/**
 * Creates an object joining values from the Harray (which will be the keys) and values from the argument array (which will be the values).
 * @name Harray#zip
 * @method
 * @param {Array} arr - An array of values.
 * @returns {Object} An object whose keys come from the Harray and values come from the argument passed.
 */
export function zip(arr) {
    if (Object.prototype.toString.call(arr) !== '[object Array]') {
        throw new TypeError();
    }

    let zipped = [];
    for (let i = 0; i < arr.length; i++) {
        let current = {};
        current[this.get(i)] = arr[i];
        zipped.push(current);
    }

    return zipped;
}<commit_msg>Zip method example on JSDoc<commit_after>/**
 * Creates an object joining values from the Harray (which will be the keys) and values from the argument array (which will be the values).
 * @name Harray#zip
 * @method
 * @param {Array} arr - An array of values.
 * @returns {Object} An object whose keys come from the Harray and values come from the argument passed.
 * @example
 * let harr = new Harray(0, 2);
 * let fruits = ['apple', 'pear', 'banana', 'papaya'];
 * harr.zip(fruits) // -> {0: 'apple', 2: 'pear', 4: 'banana', 6: 'papaya'}
 */
export function zip(arr) {
    if (Object.prototype.toString.call(arr) !== '[object Array]') {
        throw new TypeError();
    }

    let zipped = [];
    for (let i = 0; i < arr.length; i++) {
        let current = {};
        current[this.get(i)] = arr[i];
        zipped.push(current);
    }

    return zipped;
}
{'fraction_non_alphanumeric': 0.14378659726740403, 'fraction_numerical': 0.00520494469746259, 'mean_word_length': 2.943589743589744, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '1306689', 'n_tokens_mistral': 489, 'n_tokens_neox': 476, 'n_words': 181}