<commit_before>var request = require("request");
var token = "";
var timeout = 1000;

Object.prototype.toString = function(){
	var keys = Object.keys(this);
	var str = "";
	for (var i = 0; i < keys.length; i++) {
		var key = keys[i];
		var val = this[key];
		if(i <= 0)
			str += key+"="+val;
		else
			str += "&"+key+"="+val;
	};
	return str;
};

var get_method = function (mathod, params, callback){
	var str_params = params != null ? params.toString()+"&" : "";
	var url = 'https://api.vk.com/method/'+mathod+'?'+str_params+'access_token='+token;
	request({url:url, timeout: timeout}, function(error, response, body){
		if(!error)
		{
			var res = JSON.parse(body);
			if(!res.error)
				callback(res.response);
			else
				callback(null, res);
		}
		else<commit_msg>Update vk.js<commit_after>var request = require("request");
var token = "";
var timeout = 1000;

Object.prototype.toString = function(){
	var keys = Object.keys(this);
	var str = "";
	for (var i = 0; i < keys.length; i++) {
		var key = keys[i];
		var val = this[key];
		if(i <= 0)
			str += key+"="+val;
		else
			str += "&"+key+"="+val;
	};
	return str;
};

var get_method = function (mathod, params, callback){
	var str_params = params != null ? params.toString()+"&" : "";
	var url = 'https://api.vk.com/method/'+mathod+'?'+str_params+'access_token='+token;
	request({url:url, timeout: timeout}, function(error, response, body){
		if(!error)
		{
			var res = JSON.parse(body);
			if(!res.error)
				callback(res.response, null);
			else
				callback(null, res);
		}
		else
{'fraction_non_alphanumeric': 0.20064724919093851, 'fraction_numerical': 0.007766990291262136, 'mean_word_length': 3.861635220125786, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6842868', 'n_tokens_mistral': 615, 'n_tokens_neox': 560, 'n_words': 135}