<commit_before>/* Friends List system
 * This is a simple friends list system for Pokemon Showdown.
 * It will alert you when your friends come online.  It also 
 * will show you the last time they were online on the server.
 * by: panpawn
 */

var fs = require('fs');
var moment = require('moment');
var Friends = {};
var filepath = 'config/friends.json';

function getName(user) {
	return (Users.getExact(user) && Users(user).connected ? Users.getExact(user).name : user)
}

function loadFriendsList() {
	try {
		Friends = JSON.parse(fs.readFileSync(filepath));
	} catch (e) {
		Friends = {};
	}
}
loadFriendsList();

function updateFriends() {
	fs.writeFile(filepath, JSON.stringify(Friends));
}

function getFriendsNumber(user) {
	var list = Object.keys(Friends);
	var number = 0;
	list.forEach(function(kek) {
		Friends[kek].forEach(function(kek2) {
			if (kek2 === user) number ++;
		});
	});
	return number;
}<commit_msg>Fix styling of a line of code in friendlist<commit_after>/* Friends List system
 * This is a simple friends list system for Pokemon Showdown.
 * It will alert you when your friends come online.  It also 
 * will show you the last time they were online on the server.
 * by: panpawn
 */

var fs = require('fs');
var moment = require('moment');
var Friends = {};
var filepath = 'config/friends.json';

function getName(user) {
	return (Users.getExact(user) && Users(user).connected ? Users.getExact(user).name : user)
}

function loadFriendsList() {
	try {
		Friends = JSON.parse(fs.readFileSync(filepath));
	} catch (e) {
		Friends = {};
	}
}
loadFriendsList();

function updateFriends() {
	fs.writeFile(filepath, JSON.stringify(Friends));
}

function getFriendsNumber(user) {
	var list = Object.keys(Friends);
	var number = 0;
	list.forEach(function(kek) {
		Friends[kek].forEach(function(kek2) {
			if (kek2 === user) number++;
		});
	});
	return number;
}
{'fraction_non_alphanumeric': 0.140053050397878, 'fraction_numerical': 0.003183023872679045, 'mean_word_length': 4.357954545454546, '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': '7028990', 'n_tokens_mistral': 646, 'n_tokens_neox': 625, 'n_words': 180}