"use strict";

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

var _ramda = require("ramda");

/**
 * ```
 * getFilesExtensions(require.context(...)) => ['webp', 'png']
 * ```
 */
var getFilesExtensions = function getFilesExtensions(requireContext) {
  var extensions = requireContext.keys().map(function (relativeFilePath) {
    var relativePathToImageArray = relativeFilePath.split('.');
    var extension = relativePathToImageArray[relativePathToImageArray.length - 1];
    return extension;
  });
  return (0, _ramda.uniq)(extensions);
};

exports.getFilesExtensions = getFilesExtensions;
var _default = getFilesExtensions;
exports["default"] = _default;