"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.removeHashFromFileName = removeHashFromFileName;

function removeHashFromFileName(fileName, hashLength) {
  let outputFileName = '';
  fileName.split('.').forEach(iterateValue => {
    if (outputFileName === '') {
      outputFileName += iterateValue;
    } else if (iterateValue.length < hashLength) {
      outputFileName += `.${iterateValue}`;
    }
  });
  return outputFileName;
}