"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getStringAsNumber = exports.getNumberAsString = void 0;
var isNumeric = function isNumeric(n) {
  return Number.isFinite(n);
};
var getNumberAsString = exports.getNumberAsString = function getNumberAsString(value) {
  if (isNumeric(value)) {
    return value.toString();
  }
  if (typeof value === 'string' && isNumeric(Number.parseFloat(value))) {
    return value;
  }
  return '';
};
var getStringAsNumber = exports.getStringAsNumber = function getStringAsNumber() {
  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  var valueStr = getNumberAsString(value);
  return Number(valueStr.replace(',', '.'));
};