<commit_before>'use strict';

var ValidationBag = require('./validation-bag');
var Rule = require('./rule');
var Validator = require('./validator');
var mixin = require('./mixin');
var utils = require('./utils');

/* plugin install
 ----------------------------------- */

function install(Vue, options) {
  Vue.mixin(mixin);
  if (options && options.templates) {
    Validator.extendTemplates(options.templates);
  }
  if (options && options.Promise) {
    mixin.Promise = options.Promise;
  }
}

function extendTemplates(newTemplates) {
  Object.keys(newTemplates).forEach(function (key) {
    utils.templates[key] = newTemplates[key];
  });
}

/* exports
 ----------------------------------- */

module.exports.name = 'SimpleVueValidator';
module.exports.ValidationBag = ValidationBag;
module.exports.Rule = Rule;
module.exports.Validator = Validator;
module.exports.mixin = mixin;
module.exports.install = install;
module.exports.extendTemplates = extendTemplates;
<commit_msg>bug fix<commit_after>'use strict';

var ValidationBag = require('./validation-bag');
var Rule = require('./rule');
var Validator = require('./validator');
var mixin = require('./mixin');
var utils = require('./utils');

/* plugin install
 ----------------------------------- */

function install(Vue, options) {
  Vue.mixin(mixin);
  if (options && options.templates) {
    extendTemplates(options.templates);
  }
  if (options && options.Promise) {
    mixin.Promise = options.Promise;
  }
}

function extendTemplates(newTemplates) {
  Object.keys(newTemplates).forEach(function (key) {
    utils.templates[key] = newTemplates[key];
  });
}

/* exports
 ----------------------------------- */

module.exports.name = 'SimpleVueValidator';
module.exports.ValidationBag = ValidationBag;
module.exports.Rule = Rule;
module.exports.Validator = Validator;
module.exports.mixin = mixin;
module.exports.install = install;
module.exports.extendTemplates = extendTemplates;

{'fraction_non_alphanumeric': 0.21428571428571427, 'fraction_numerical': 0.0, 'mean_word_length': 3.2603938730853392, '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': '5579239', 'n_tokens_mistral': 555, 'n_tokens_neox': 553, 'n_words': 107}