<commit_before>'use strict';

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

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); } }

var drawSecretSantas = function drawSecretSantas(users) {
  // Shuffle all the users
  var shuffled = users.sort(function () {
    return Math.floor(Math.random() * users.length);
  });

  // Create new list and just take all the shuffled users
  var gifters = [].concat(_toConsumableArray(shuffled));

  // Create a second list that takes the shuffled gifters ...
  var recipients = [].concat(_toConsumableArray(shuffled));

  // ... and move the first one to the last! We
  // don't want pairs or small groups of the raffle. This keeps it snaky 🐍!
  recipients.push(recipients.shift());

  // Boom, let's raffle! 🎫
  var raffle = users.map(function (user, raffleRound) {
    var gifter = gifters[raffleRound];
    var recipient = recipients[raffleRound];

    return {
      gifter: gifter,
      recipient: recipient
    };
  });

  return raffle;
};

exports.default = drawSecretSantas;<commit_msg>Update terminology<commit_after>'use strict';

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

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); } }

var drawSecretSantas = function drawSecretSantas(users) {
  // Shuffle all the users
  var shuffled = users.sort(function () {
    return Math.floor(Math.random() * users.length);
  });

  // Create new list and just take all the shuffled users
  var givers = [].concat(_toConsumableArray(shuffled));

  // Create a second list that takes the shuffled givers ...
  var recipients = [].concat(_toConsumableArray(shuffled));

  // ... and move the first one to the last! We
  // don't want pairs or small groups of the draw. This keeps it snaky 🐍!
  recipients.push(recipients.shift());

  // Boom, let's draw! 🎫
  var draw = users.map(function (user, drawRound) {
    var giver = givers[drawRound];
    var recipient = recipients[drawRound];

    return {
      giver: giver,
      recipient: recipient
    };
  });

  return draw;
};

exports.default = drawSecretSantas;
{'fraction_non_alphanumeric': 0.13557894736842105, 'fraction_numerical': 0.003368421052631579, 'mean_word_length': 3.586872586872587, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1772384', 'n_tokens_mistral': 797, 'n_tokens_neox': 771, 'n_words': 226}