<commit_before>'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

// Copyright (c) 2017 by <NAME> <<EMAIL>>. All Rights Reserved.
// This code is provided under the MIT license.
// You can find the full text in the package you get this file with.

/* eslint-disable import/no-extraneous-dependencies */

/* eslint-enable import/no-extraneous-dependencies */

exports.castMetadata = castMetadata;
exports.destroyMetadata = destroyMetadata;

var _vue = require('vue');

var _vue2 = _interopRequireDefault(_vue);

var _lodash = require('lodash.get');

var _lodash2 = _interopRequireDefault(_lodash);

var _lodash3 = require('lodash.assign');

var _lodash4 = _interopRequireDefault(_lodash3);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

/**
 * Helper functions.
 */


/**
 * Types that are used in the module.
 */


/**
 * @deprecated It's better to use another module to create components
 * from functions.
 */
var metadata = {};
function castMetadata(self, options) {
  /* eslint-disable no-underscore-dangle */
  if (metadata[self._uid]) {
    return { metadata: metadata[self._uid] };
  }

  if (options.metadata) {
    if (!metadata[self._uid]) {
      metadata[self._uid] = _extends({}, options.metadata);
    }

    return { metadata: metadata[self._uid] };
  }
  /* eslint-enable no-underscore-dangle */

  return {};
}

function destroyMetadata(self, options) {
  /* eslint-disable no-underscore-dangle */
  if (options.metadata && metadata[self._uid]) {
    delete metadata[self._uid];
  }
  /* eslint-enable no-underscore-dangle */
}

function getPrepareOtherData(options) {
  var prepare = options.prepareData || options.preapreData;
  return prepare ? function (self) {
    return prepare(self, options);
  } : function () {
    return {};
  };
}

/**
 * Module export.
 * Wrap function that simplifies HOC creation for VueJs.
 */

exports.default = function () {
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  return function (com) {
    var injectedOptions = (0, _lodash2.default)(options, 'options', {});

    var mixins = [].concat(_toConsumableArray(options.options && options.options.mixins ? options.options.mixins : []), [{
      created: function created() {
        this.$hocMetadata = castMetadata(this, options).metadata;
      },
      destroyed: function destroyed() {
        destroyMetadata(this, options);
      }
    }]);

    if (!(com.name || com.options)) {<commit_msg>Updated build<commit_after>'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

// Copyright (c) 2017 by <NAME> <<EMAIL>>. All Rights Reserved.
// This code is provided under the MIT license.
// You can find the full text in the package you get this file with.

/* eslint-disable import/no-extraneous-dependencies */

/* eslint-enable import/no-extraneous-dependencies */

exports.castMetadata = castMetadata;
exports.destroyMetadata = destroyMetadata;

var _vue = require('vue');

var _vue2 = _interopRequireDefault(_vue);

var _lodash = require('lodash.get');

var _lodash2 = _interopRequireDefault(_lodash);

var _lodash3 = require('lodash.assign');

var _lodash4 = _interopRequireDefault(_lodash3);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

/**
 * Helper functions.
 */


/**
 * Types that are used in the module.
 */


/**
 * @deprecated It's better to use another module to create components
 * from functions: https://github.com/vashigor/great-vue-func-com.
 */
var metadata = {};
function castMetadata(self, options) {
  /* eslint-disable no-underscore-dangle */
  if (metadata[self._uid]) {
    return { metadata: metadata[self._uid] };
  }

  if (options.metadata) {
    if (!metadata[self._uid]) {
      metadata[self._uid] = _extends({}, options.metadata);
    }

    return { metadata: metadata[self._uid] };
  }
  /* eslint-enable no-underscore-dangle */

  return {};
}

function destroyMetadata(self) {
  /* eslint-disable no-underscore-dangle */
  if (metadata[self._uid]) {
    delete metadata[self._uid];
  }
  /* eslint-enable no-underscore-dangle */
}

function getPrepareOtherData(options) {
  var prepare = options.prepareData || options.preapreData;
  return prepare ? function (self) {
    return prepare(self, options);
  } : function () {
    return {};
  };
}

/**
 * Module export.
 * Wrap function that simplifies HOC creation for VueJs.
 */

exports.default = function () {
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  return function (com) {
    var injectedOptions = (0, _lodash2.default)(options, 'options', {});

    var mixins = [].concat(_toConsumableArray(options.options && options.options.mixins ? options.options.mixins : []), [{
      created: function created() {
        this.$hocMetadata = castMetadata(this, options).metadata;
      },
      destroyed: function destroyed() {
        destroyMetadata(this);
      }
    }]);

    if (!(com.name || com.options)) {
{'fraction_non_alphanumeric': 0.15110441767068272, 'fraction_numerical': 0.006358768406961178, 'mean_word_length': 3.7436507936507937, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 1, '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': '2701859', 'n_tokens_mistral': 1898, 'n_tokens_neox': 1850, 'n_words': 473}