var defaultCharacterWidth = '1ch';
var numberSchema = /^(-)?\d+(\.\d+)?$/;
var excludingNumberSchema = /[^-.\d]/g;
var getPreciseValue = function getPreciseValue(value, precision) {
  var innerValue = String(value);
  if (precision !== undefined) {
    var factor = Math.pow(10, precision);
    var preparedValue = Number(innerValue) < 0 ? Number(innerValue) - Number.EPSILON : Number(innerValue) + Number.EPSILON;
    return String(Math.round(preparedValue * factor) / factor);
  }
  return innerValue;
};

export { defaultCharacterWidth, excludingNumberSchema, getPreciseValue, numberSchema };
