<commit_before>/**
 * Transaction
 * An account of what has happened. Follows the standard action specification here:
 * https://github.com/acdlite/flux-standard-action
 */

const POOL = []
const BLUEPRINT = {
  id       : null,
  payload  : null,
  type     : null,
  error    : false,
  complete : false
}

let id = 0

module.exports = function Transaction (type, payload=null) {
  let transaction = pool.pop() || Object.create(blueprint)

  transaction.id       = id++
  transaction.payload  = payload
  transaction.type     = type
  transaction.error    = false
  transaction.complete = false

  return transaction
}

module.exports.release = function(transaction) {
  pool.push(transaction)
}<commit_msg>Fix broken test<commit_after>/**
 * Transaction
 * An account of what has happened. Follows the standard action specification here:
 * https://github.com/acdlite/flux-standard-action
 */

const POOL = []
const BLUEPRINT = {
  id       : null,
  payload  : null,
  type     : null,
  error    : false,
  complete : false
}

let id = 0

module.exports = function Transaction (type, payload=null) {
  let transaction = POOL.pop() || Object.create(BLUEPRINT)

  transaction.id       = id++
  transaction.payload  = payload
  transaction.type     = type
  transaction.error    = false
  transaction.complete = false

  return transaction
}

module.exports.release = function(transaction) {
  POOL.push(transaction)
}
{'fraction_non_alphanumeric': 0.10704225352112676, 'fraction_numerical': 0.0014084507042253522, 'mean_word_length': 3.191740412979351, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4581869', 'n_tokens_mistral': 426, 'n_tokens_neox': 414, 'n_words': 114}