<commit_before>import { inject } from 'aurelia-framework';
import { EventAggregator } from 'aurelia-event-aggregator';
import { colors } from '../../../shared/config/colors';

@inject(EventAggregator, colors)
export class New {
    public poll: any;
    public color: Function;
    public newOption: string;

    private ea: EventAggregator;

    constructor (ea: EventAggregator, colors) {
        this.ea = ea;
        this.color = colors.standard;

        this.poll = {
            name: 'name',
            options: []
        };
    }

    public addOption (name = '') {
        const { poll } = this;

        const option = {
            id: Date.now(),
            name,
            value: 1
        };
        poll.options = poll.options.concat([option]);

        this.newOption = '';
    }

    public create (poll) {
        const { name, options } = poll;
        const slim = { name, options };<commit_msg>refactor(polls-new): inject color<commit_after>import { inject } from 'aurelia-framework';
import { EventAggregator } from 'aurelia-event-aggregator';
import { colors } from '../../../shared/config/colors';

@inject(EventAggregator, colors.standard)
export class New {
    public poll: any;
    public color: Function;
    public newOption: string;

    private ea: EventAggregator;

    constructor (ea: EventAggregator, color) {
        this.ea = ea;
        this.color = color;

        this.poll = {
            name: 'name',
            options: []
        };
    }

    public addOption (name = '') {
        const { poll } = this;

        const option = {
            id: Date.now(),
            name,
            value: 1
        };
        poll.options = poll.options.concat([option]);

        this.newOption = '';
    }

    public create (poll) {
        const { name, options } = poll;
        const slim = { name, options };
{'fraction_non_alphanumeric': 0.13010752688172042, 'fraction_numerical': 0.001075268817204301, 'mean_word_length': 1.9169278996865204, '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': '3093196', 'n_tokens_mistral': 540, 'n_tokens_neox': 531, 'n_words': 138}