<commit_before>"use strict";

/**
* CONTROLLER - `home`
* - Triggers the `todoListComponent` which renders a list in the `HomeComponent`
*
* @module Component->Home-Controller
* @param {Object} component$ The `component.service` module
* @param {Object} data$ The `data.service` module
*/

import todoListComponent from "~/app/component/todo-list/todo-list.component.js";

export default function HomeComponentController(
	component$,
	data$
) {
	const vm = this;
	vm.projectName = "Rectangular";
	
	// Immutable todo list
	vm.todo = data$.fromJS([
		"get groceries",
		"mow the lawn",
		"be a ninja"
	]);
	
	// Updated by TodoList parent (HomeComponentController)
	vm.newTodoListItem = "";
	
	// Called by TodoList parent (HomeComponentController)
	vm.updateTodoList = () => {
		if (vm.newTodoListItem.length) {
			vm.todo = vm.todo.push(vm.newTodoListItem);
		}
	};
	
	vm.updateTodoList();
};
<commit_msg>Removed import<commit_after>"use strict";

/**
* CONTROLLER - `home`
* - Triggers the `todoListComponent` which renders a list in the `HomeComponent`
*
* @module Component->Home-Controller
* @param {Object} component$ The `component.service` module
* @param {Object} data$ The `data.service` module
*/

export default function HomeComponentController(
	component$,
	data$
) {
	const vm = this;
	vm.projectName = "Rectangular";
	
	// Immutable todo list
	vm.todo = data$.fromJS([
		"get groceries",
		"mow the lawn",
		"be a ninja"
	]);
	
	// Updated by TodoList parent (HomeComponentController)
	vm.newTodoListItem = "";
	
	// Called by TodoList parent (HomeComponentController)
	vm.updateTodoList = () => {
		if (vm.newTodoListItem.length) {
			vm.todo = vm.todo.push(vm.newTodoListItem);
		}
	};
	
	vm.updateTodoList();
};

{'fraction_non_alphanumeric': 0.1420323325635104, 'fraction_numerical': 0.0, 'mean_word_length': 4.142433234421365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5039865', 'n_tokens_mistral': 629, 'n_tokens_neox': 591, 'n_words': 143}