Skip to content

@technobuddha > library > String > Operations

Type Alias: FilenameOptions

ts
type FilenameOptions = {
  disambiguate?: number;
  maxLength?: number;
  replacement?: string;
  separator?: string;
};

Defined in: to-filename.ts:16

Options for the toFilename function

Properties

PropertyTypeDescriptionDefined in
disambiguate?numbernumber of characters to preserve at the end of the filename when truncated (for disambiguation)src/to-filename.ts:22
maxLength?numberthe file name will be truncated to this lengthsrc/to-filename.ts:18
replacement?stringcharacter to use to replace "bad" characterssrc/to-filename.ts:20
separator?stringstring to separate the main section from the disambiguated sectionsrc/to-filename.ts:24