<commit_before>/*!
 * V4Fire Client Core
 * https://github.com/V4Fire/Client
 *
 * Released under the MIT license
 * https://github.com/V4Fire/Client/blob/master/LICENSE
 */

/// <reference types="socket.io"/>
import URI = require('urijs');

// tslint:disable-next-line
export const PING = (5).seconds();

/**
 * Wrapper for sockets
 * @param [namespace] - connection namespace
 */
export function IO(namespace: string = ''): SocketIO.Client {
	return require('socket.io-client').connect(new URI(API).path(namespace).toString(), {
		allowUpgrades: false,
		transports: ['websocket'],
		pingTimeout: PING,
		pingInterval: PING
	});
}
<commit_msg>Refactoring<commit_after>/*!
 * V4Fire Client Core
 * https://github.com/V4Fire/Client
 *
 * Released under the MIT license
 * https://github.com/V4Fire/Client/blob/master/LICENSE
 */

/// <reference types="socket.io"/>
import URI = require('urijs');

export const PING = (5).seconds();
export type Socket = SocketIO.Client;

/**
 * Wrapper for sockets
 * @param [namespace] - connection namespace
 */
export default function socket(namespace: string = ''): SocketIO.Client {
	return require('socket.io-client').connect(new URI(API).path(namespace).toString(), {
		allowUpgrades: false,
		transports: ['websocket'],
		pingTimeout: PING,
		pingInterval: PING
	});
}

{'fraction_non_alphanumeric': 0.1648854961832061, 'fraction_numerical': 0.0061068702290076335, 'mean_word_length': 4.372950819672131, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '2180134', 'n_tokens_mistral': 427, 'n_tokens_neox': 414, 'n_words': 92}