<commit_before>(function( ) {
    'use strict';


    function initRoute(model) {
        Mortar.hash(":root").on("change", function(evt, value) {
            model.filterMode(value);
        });
    }


    function read() {
        return  {
            items: JSON.parse(localStorage.getItem("todos-mortarjs")) || []
        };
    }


    function save(data) {
        localStorage.setItem("todos-mortarjs", JSON.stringify(data));
    }


    app.model.todo = Mortar.koModel.extend({
        data: read(),
        _init: init
    });


    function init() {
        expandModel(this.data);
        initRoute(this.data);
    }


    function expandModel(model) {
        var toggleState = false;

        function newItem(title, state) {
            return Mortar.koFactory({
                "completed": state === true,
                "title": title,
                "editing": false,
                "show": true
            });<commit_msg>Moving Model definition to the top so that's easier to find<commit_after>(function( ) {
    'use strict';


    app.model.todo = Mortar.koModel.extend({
        data: read(),
        _init: init
    });


    function init() {
        expandModel(this.data);
        initRoute(this.data);
    }


    function initRoute(model) {
        Mortar.hash(":root").on("change", function(evt, value) {
            model.filterMode(value);
        });
    }


    function read() {
        return  {
            items: JSON.parse(localStorage.getItem("todos-mortarjs")) || []
        };
    }


    function save(data) {
        localStorage.setItem("todos-mortarjs", JSON.stringify(data));
    }



    function expandModel(model) {
        var toggleState = false;

        function newItem(title, state) {
            return Mortar.koFactory({
                "completed": state === true,
                "title": title,
                "editing": false,
                "show": true
            });
{'fraction_non_alphanumeric': 0.13666838576585869, 'fraction_numerical': 0.0, 'mean_word_length': 1.7478753541076488, 'pattern_counts': {'":': 10, '<': 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': '6152650', 'n_tokens_mistral': 585, 'n_tokens_neox': 547, 'n_words': 104}