<commit_before>'use strict';

export let getMapping = require('./get-mapping').getMapping;
export let getAxial = require('./deadzones').getAxial;
export let getScaledAxial = require('./deadzones').getScaledAxial;
export let getRadial = require('./deadzones').getRadial;
export let getScaledRadial = require('./deadzones').getScaledRadial;
export const deadZones = require('./mapping.json').deadZones;<commit_msg>use a string to determine which deadzone calc you want<commit_after>'use strict';

export const getMapping = require('./get-mapping').getMapping;
export const getAxial = require('./deadzones').getAxial;
export const getScaledAxial = require('./deadzones').getScaledAxial;
export const getRadial = require('./deadzones').getRadial;
export const getScaledRadial = require('./deadzones').getScaledRadial;
export const deadZones = require('./mapping.json').deadZones;

const deadzoneOptions = {
  'axial': function axial (stick, deadzone) {
    return {
      x: getAxial(stick.x, deadzone),
      y: getAxial(stick.y, deadzone)
    };
  },
  'scaled-axial': function scaledAxial (stick, deadzone) {
    return {
      x: getScaledAxial(stick.x, deadzone),
      y: getScaledAxial(stick.y, deadzone)
    };
  },
  'radial': getRadial,
  'scaled-radial': getScaledRadial
};

export function pickDeadzone (option) {
  return deadzoneOptions[option];
}
{'fraction_non_alphanumeric': 0.1400147383935151, 'fraction_numerical': 0.0, 'mean_word_length': 5.035555555555556, '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': '2915066', 'n_tokens_mistral': 441, 'n_tokens_neox': 422, 'n_words': 96}