<commit_before>/**
 * Created by azu on 2014/03/09.
 * LICENSE : MIT
 */
"use strict";
var falafel = require('falafel');
var estraverse = require("estraverse");
var esprima = require("esprima");
var escodegen = require("escodegen");
var astRemove = require("./ast-remove");
var _ = require("lodash");
var IGNORE_MARK = "---";
function createHelper() {
    return {
        // var add = require("./add")
        isStringLiteral: function (node) {
            return node.type === estraverse.Syntax.ExpressionStatement &&
                node.expression.type === estraverse.Syntax.Literal &&
                typeof node.expression.value === "string";
        }
    }
}

var defaultOptions = {
    force: false // force remove all
};

function removeUseStrict(src, opts) {
    var esprimaOptions = { range: true, tokens: true, comment: true };
    var ast = esprima.parse(src, esprimaOptions);
    if (esprimaOptions.comment == true) {
        try {
            ast = require("escodegen").attachComments(ast, ast.comments, ast.tokens);
        } catch (e) {
        }
    }
    return escodegen.generate(removeUseStrictFromAST(ast, opts), {comment: esprimaOptions.comment});
}
/**
 *
 * @param {object} ast
 * @param {object} opts
 * @returns {object} ast<commit_msg>style(IGNORE_MARK): use ゆのさん<commit_after>/**
 * Created by azu on 2014/03/09.
 * LICENSE : MIT
 */
"use strict";
var falafel = require('falafel');
var estraverse = require("estraverse");
var esprima = require("esprima");
var escodegen = require("escodegen");
var astRemove = require("./ast-remove");
var _ = require("lodash");
var IGNORE_MARK = "× / _ / × < 来週も見てくださいね";
function createHelper() {
    return {
        // var add = require("./add")
        isStringLiteral: function (node) {
            return node.type === estraverse.Syntax.ExpressionStatement &&
                node.expression.type === estraverse.Syntax.Literal &&
                typeof node.expression.value === "string";
        }
    }
}

var defaultOptions = {
    force: false // force remove all
};

function removeUseStrict(src, opts) {
    var esprimaOptions = { range: true, tokens: true, comment: true };
    var ast = esprima.parse(src, esprimaOptions);
    if (esprimaOptions.comment == true) {
        try {
            ast = require("escodegen").attachComments(ast, ast.comments, ast.tokens);
        } catch (e) {
        }
    }
    return escodegen.generate(removeUseStrictFromAST(ast, opts), {comment: esprimaOptions.comment});
}
/**
 *
 * @param {object} ast
 * @param {object} opts
 * @returns {object} ast
{'fraction_non_alphanumeric': 0.14949258391881343, 'fraction_numerical': 0.00624512099921936, 'mean_word_length': 2.9674922600619196, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1969767', 'n_tokens_mistral': 814, 'n_tokens_neox': 795, 'n_words': 188}