<commit_before>/**
 * Create new storage of {@linkcode user} objects
 * @constructor
 */
var vault = function() {
   /**
    * Amount of users saved in {@linkcode vault}
    * @type {number}
    */
   this.length = 0;
};

/**
 * Add new object to vault
 * @param {user} user object to add
 */
vault.prototype.push = function(user) {
   this[this.length] = user;
   this.length++;
};

/**
 * Return and delete object from {@linkcode vault}
 * @param {user} user {@linkcode user|User} to pop
 * @returns {user} User object
 */
vault.prototype.pop = function(user) {
   if (this.length === 0) {return undefined;}

   var toDelete = -1, i, deleted;
   for (i = 0; i < this.length && toDelete === -1; i++) {
      if (this[i].equals(user)) {toDelete = i;}
   }
   if (toDelete === -1) {return undefined;}

   deleted = this[toDelete];
   for (i = toDelete; i < this.length - 1; i++) {
      this[i] = this[i + 1];
   }
   delete this[this.length - 1];
   this.length--;

   return deleted;
};

/**
 * Export list of significant data from {@linkcode user} objects except specified user.
 * Uses {@linkcode user#copyForNetwork} to export data
 * @param {user} user {@link user|User} object to exclude
 * @returns {Array} Array of objects with important data from {@linkcode user} except specified user
 */
vault.prototype.networkExportExcept = function(user) {
   var list = [];
   for (var i = 0; i < this.length; i++) {
      if (!this[i].equals(user)) {
         list.push(this[i].copyForNetwork());
      }
   }
   return list;
};

/**
 * Export list of significant data from {@linkcode user} objects.
 * Uses {@linkcode user#copyForNetwork} to export data
 * @returns {Array} Array of objects with important data from {@linkcode user}
 */
vault.prototype.networkExportAll = function() {
   var list = [];
   for (var i = 0; i < this.length; i++) {
      list.push(this[i].copyForNetwork());
   }
   return list;
};

/**
 * Get {@linkcode user} object by {@linkcode user#uuid|uuid}
 * @param {string} uuid Identifier of {@linkcode user}
 * @returns {user|undefined} {@linkcode user} object or undefined
 */
vault.prototype.get = function(uuid) {
   for (var i = 0; i < this.length; i++) {
      if (this[i].uuid === uuid) {return this[i];}
   }
   return undefined;
};

module.exports = vault;<commit_msg>chore(networkExportAll): remove unused method<commit_after>/**
 * Create new storage of {@linkcode user} objects
 * @constructor
 */
var vault = function() {
   /**
    * Amount of users saved in {@linkcode vault}
    * @type {number}
    */
   this.length = 0;
};

/**
 * Add new object to vault
 * @param {user} user object to add
 */
vault.prototype.push = function(user) {
   this[this.length] = user;
   this.length++;
};

/**
 * Return and delete object from {@linkcode vault}
 * @param {user} user {@linkcode user|User} to pop
 * @returns {user} User object
 */
vault.prototype.pop = function(user) {
   if (this.length === 0) {return undefined;}

   var toDelete = -1, i, deleted;
   for (i = 0; i < this.length && toDelete === -1; i++) {
      if (this[i].equals(user)) {toDelete = i;}
   }
   if (toDelete === -1) {return undefined;}

   deleted = this[toDelete];
   for (i = toDelete; i < this.length - 1; i++) {
      this[i] = this[i + 1];
   }
   delete this[this.length - 1];
   this.length--;

   return deleted;
};

/**
 * Export list of significant data from {@linkcode user} objects except specified user.
 * Uses {@linkcode user#copyForNetwork} to export data
 * @param {user} user {@link user|User} object to exclude
 * @returns {Array} Array of objects with important data from {@linkcode user} except specified user
 */
vault.prototype.networkExportExcept = function(user) {
   var list = [];
   for (var i = 0; i < this.length; i++) {
      if (!this[i].equals(user)) {
         list.push(this[i].copyForNetwork());
      }
   }
   return list;
};

/**
 * Get {@linkcode user} object by {@linkcode user#uuid|uuid}
 * @param {string} uuid Identifier of {@linkcode user}
 * @returns {user|undefined} {@linkcode user} object or undefined
 */
vault.prototype.get = function(uuid) {
   for (var i = 0; i < this.length; i++) {
      if (this[i].uuid === uuid) {return this[i];}
   }
   return undefined;
};

module.exports = vault;
{'fraction_non_alphanumeric': 0.16137379440131733, 'fraction_numerical': 0.005410491649023759, 'mean_word_length': 3.189162561576355, 'pattern_counts': {'":': 0, '<': 12, '<?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': '5481709', 'n_tokens_mistral': 1392, 'n_tokens_neox': 1368, 'n_words': 440}