• Removes the file extension if exists

    Parameters

    • fileName: string

      file name to remove extension from

    Returns string

    file name without extension

    removeFileExtension('test.ext'); // test
    removeFileExtension('test.ext.doc'); // test.ext
    removeFileExtension('test'); // test