<commit_before>'use strict';

const Table = require( 'cli-table' );

class Aliases {
	constructor( context ) {
		this.context = context;
	}

	handleRequest( request ) {
		if ( request.text != 'aliases' ) {
			return null;
		}

		const table = new Table( { style : { compact : true } } );

		table.push( [ 'Alias:', 'Value:' ], [] );

		for ( let alias of this.context.aliases ) {
			table.push( [ alias, this.context.aliases.getValue( alias ) ] );
		}

		return {
			'text': '```' + table.toString() + '```',
			'response_type': 'in_channel'
		};
	}
}

module.exports = Aliases;<commit_msg>Closes #28: /fb aliases should be in private.<commit_after>'use strict';

const Table = require( 'cli-table' );

class Aliases {
	constructor( context ) {
		this.context = context;
	}

	handleRequest( request ) {
		if ( request.text != 'aliases' ) {
			return null;
		}

		const table = new Table( { style : { compact : true } } );

		table.push( [ 'Alias:', 'Value:' ], [] );

		for ( let alias of this.context.aliases ) {
			table.push( [ alias, this.context.aliases.getValue( alias ) ] );
		}

		return {
			'text': '```' + table.toString() + '```'
		};
	}
}

module.exports = Aliases;
{'fraction_non_alphanumeric': 0.18505942275042445, 'fraction_numerical': 0.001697792869269949, 'mean_word_length': 3.1080139372822297, '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': '6306304', 'n_tokens_mistral': 454, 'n_tokens_neox': 406, 'n_words': 94}