"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = trimString;

var _enum = require("../data-set/enum");

function trimString(value, fieldTrim) {
  if (fieldTrim) {
    switch (fieldTrim) {
      case _enum.FieldTrim.both:
        return value.trim();

      case _enum.FieldTrim.left:
        return value.trimLeft();

      case _enum.FieldTrim.right:
        return value.trimRight();

      default:
    }
  }

  return value;
}
//# sourceMappingURL=trimString.js.map
