<commit_before>module.exports = function(block){

	if( !block ){
		throw new Error('Missing block parameter.');
	}

	return {

		states: {
			active: 'is-active',
			hidden: 'is-hidden',
			loading: 'is-loading',
			fixed: 'is-fixed',
		},

		event: function(_event){

			return block + ':' + _event;

		},

		selector: function(_element){

			return '.js-' + block + (_element ? ('__' + _element) : '');

		},

	};

};<commit_msg>Updates bem js module.<commit_after>module.exports = {

	states: {
		active: 'is-active',
		fixed: 'is-fixed',
		hidden: 'is-hidden',
		loading: 'is-loading',
	},

	block: function(name) {
		if( !name ){
			throw new Error('Empty block name.');
		}

		return {

			event: function(event){
				return name + ':' + event;
			},

			selector: function(element){
				return '.js-' + name + (element ? ('__' + element) : '');
			},

		};
	}

};
{'fraction_non_alphanumeric': 0.19770114942528735, 'fraction_numerical': 0.0, 'mean_word_length': 2.9234234234234235, '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': '5592346', 'n_tokens_mistral': 363, 'n_tokens_neox': 303, 'n_words': 66}