"use strict";

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

var _path = _interopRequireDefault(require("path"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function addHashToFilePath(filePath, hash) {
  const pathObj = _path.default.parse(filePath);

  const updatedFilePath = _path.default.format({
    dir: pathObj.dir,
    name: `${pathObj.name}.${hash}`,
    ext: pathObj.ext
  });

  return updatedFilePath;
}