<commit_before>/*global define*/

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

define(
    [
        'require',
        'underscore',
        'lib/lang/class',
        'lib/backbone/view/abstract'
    ],
    function (
        require,
        _,
        Class,
        AbstractView
    ) {
        'use strict';

        var FormBuilder;

        FormBuilder = AbstractView.extend({
            className: 'form',

            /**
             * @param {Object} options
             */
            initialize: function (options) {
                Class.callSuper(AbstractView, 'initialize', arguments, this);

                this.di = options.di;
            },

            /**
             * Add a check if in path is no slash prefix path with 'lib/backbone/view/form/field/'
             *
             * @param {string} property
             * @param {string} type
             * @param {Object} options
             * @returns {FormBuilder}
             */
            add: function (property, type, options) {
                options.model = this.model;
                options.property = property;

                this.addChild(this.di.get(type)(options));

                return this;
            }
        });

        return FormBuilder;
    }
);
<commit_msg>di renamed to services<commit_after>/*global define*/

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

define(
    [
        'require',
        'underscore',
        'lib/lang/class',
        'lib/backbone/view/abstract'
    ],
    function (
        require,
        _,
        Class,
        AbstractView
    ) {
        'use strict';

        var FormBuilder;

        FormBuilder = AbstractView.extend({
            className: 'form',

            /**
             * @param {Object} options
             */
            initialize: function (options) {
                Class.callSuper(AbstractView, 'initialize', arguments, this);

                this.services = options.services;
            },

            /**
             * Add a check if in path is no slash prefix path with 'lib/backbone/view/form/field/'
             *
             * @param {string} property
             * @param {string} type
             * @param {Object} options
             * @returns {FormBuilder}
             */
            add: function (property, type, options) {
                options.model = this.model;
                options.property = property;

                this.addChild(this.services.get(type)(options));

                return this;
            }
        });

        return FormBuilder;
    }
);

{'fraction_non_alphanumeric': 0.11724915445321307, 'fraction_numerical': 0.0, 'mean_word_length': 1.318815331010453, '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': '4673642', 'n_tokens_mistral': 710, 'n_tokens_neox': 677, 'n_words': 153}