function titleFromFileName
titleFromFileName(name: string): string

Returns the file name name as the title the dump creation dialog proposes. The extension goes, since the dump keeps its MIME type, and runs of underscores become spaces, so holiday_photo-01.final.jpg reads as holiday photo-01.final. A name that is only an extension (.gitignore) stays as it is.

Parameters

name: string

Return Type

string

Usage

import { titleFromFileName } from "src/utils/shared/format.ts";