<commit_before>/**
 * Created by jlchereau on 01/05/2015.
 */


function normalize (str) {
    return str
        .replace(/[\/]+/g, '/')
        .replace(/\/\?/g, '?')
        .replace(/\/\#/g, '#')
        .replace(/\:\//g, '://');
}


module.exports = {

    /**
     *
     * @see https://github.com/jfromaniello/url-join/blob/master/lib/url-join.js
     * @returns {*}<commit_msg>Minor changes<commit_after>/**
 * Copyright (c) 2013-2015 Memba Sarl. All rights reserved.
 * Sources at https://github.com/Memba
 */

/* jshint node: true */

'use strict';

function normalize (str) {
    return str
        .replace(/[\/]+/g, '/')
        .replace(/\/\?/g, '?')
        .replace(/\/\#/g, '#')
        .replace(/\:\//g, '://');
}

module.exports = {

    /**
     * Join url fragments
     * @see https://github.com/jfromaniello/url-join/blob/master/lib/url-join.js
     * @returns {string}
{'fraction_non_alphanumeric': 0.23878923766816143, 'fraction_numerical': 0.017937219730941704, 'mean_word_length': 1.9183006535947713, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '3991309', 'n_tokens_mistral': 347, 'n_tokens_neox': 325, 'n_words': 54}