'use strict';

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

var formatDecimal = require('./formatDecimal.js');
var formatPrefixAuto = require('./formatPrefixAuto.js');
var formatRounded = require('./formatRounded.js');

var formatTypes = {
  "%": (x, p) => (x * 100).toFixed(p),
  "b": (x) => Math.round(x).toString(2),
  "c": (x) => x + "",
  "d": formatDecimal.default,
  "e": (x, p) => x.toExponential(p),
  "f": (x, p) => x.toFixed(p),
  "g": (x, p) => x.toPrecision(p),
  "o": (x) => Math.round(x).toString(8),
  "p": (x, p) => formatRounded.default(x * 100, p),
  "r": formatRounded.default,
  "s": formatPrefixAuto.default,
  "X": (x) => Math.round(x).toString(16).toUpperCase(),
  "x": (x) => Math.round(x).toString(16)
};

exports.default = formatTypes;
