<commit_before>/**
 * Copyright 2015, Yahoo! Inc.
 * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
 */

import Ember from 'ember';
import extend from '../utils/extend';

import {
    Stream,
    read,
    readHash,
    destroyStream
} from 'ember-intl/utils/streams';

const { get } = Ember;

function getValue(params) {
    return params[0];
}

function helperFactory(formatType, optionalGetValue = getValue) {
    return function (params, hash, seenHash, env) {
        let outStream;

        function touchStream() {
            outStream.notify();
        }

        seenHash = readHash(hash);

        const view = env.data.view;
        const intl = view.container.lookup('service:intl');
        const formatter = view.container.lookup(`ember-intl@formatter:format-${formatType}`);
        const value = optionalGetValue(params, hash, intl);
<commit_msg>rename seenHash argument to options<commit_after>/**
 * Copyright 2015, Yahoo! Inc.
 * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
 */

import Ember from 'ember';
import extend from '../utils/extend';

import {
    Stream,
    read,
    readHash,
    destroyStream
} from 'ember-intl/utils/streams';

const { get } = Ember;

function getValue(params) {
    return params[0];
}

function helperFactory(formatType, optionalGetValue = getValue) {
    return function (params, hash, options, env) {
        let outStream;

        function touchStream() {
            outStream.notify();
        }

        const seenHash = readHash(hash);
        const view = env.data.view;
        const intl = view.container.lookup('service:intl');
        const formatter = view.container.lookup(`ember-intl@formatter:format-${formatType}`);
        const value = optionalGetValue(params, hash, intl);

{'fraction_non_alphanumeric': 0.11400651465798045, 'fraction_numerical': 0.0054288816503800215, 'mean_word_length': 3.068432671081678, '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': '6513030', 'n_tokens_mistral': 535, 'n_tokens_neox': 520, 'n_words': 149}