"use strict";

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

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