export function parseFilename(str) {
  var fileExt = getFileExtension(str);
  var isFilename = Boolean(fileExt);
  if (!isFilename) {
    return {
      filename: '',
      extension: '',
      isFilename: isFilename
    };
  }
  var cutoff = fileExt ? str.length - fileExt.length : str.length;
  var filename = str.substring(0, cutoff - 1);
  var extension = str.substring(cutoff);
  return {
    filename: filename,
    extension: extension,
    isFilename: isFilename
  };
}
export function getFileExtension(filename) {
  var extPos = filename.lastIndexOf('.');
  return extPos < 0 ? '' : filename.substring(extPos + 1);
}
//# sourceMappingURL=filename.js.map