<commit_before>/*global require, console*/

/**
 * @author <NAME> <<EMAIL>>
 * @copyright Apestaartje <http://apestaartje.info>
 */

require(
    ['config'],
    function() {
    'use strict';

        var s = 'lib/backbone/view/form/builder';
        require(
        [s],
        function (FormBuilder) {
            var builder = new FormBuilder();

            console.log(builder);
        }
    );
});<commit_msg>sample code for using formbuilder<commit_after>/*global require, console*/

/**
 * @author <NAME> <<EMAIL>>
 * @copyright Apestaartje <http://apestaartje.info>
 */

require(
    ['config'],
    function() {
        'use strict';

        require(
            [
                'backbone',
                'jquery',
                'lib/backbone/view/form/builder'
            ],
            function (
                Backbone,
                $,
                FormBuilder
            ) {
                var options = {
                        model: new Backbone.Model()
                    },
                    builder = new FormBuilder(options);

                builder.add('title', 'lib/backbone/view/form/field/string', {});
                builder.add('text', 'lib/backbone/view/form/field/text', {});
                builder.add('subtitle', 'lib/backbone/view/form/field/string', {});

                $('body').append(builder.render().el);

                console.log(builder);
            }
        );
    }
);
{'fraction_non_alphanumeric': 0.15155709342560553, 'fraction_numerical': 0.0, 'mean_word_length': 1.4384485666104554, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1084022', 'n_tokens_mistral': 412, 'n_tokens_neox': 390, 'n_words': 67}