image-exporter
Version:
Easily download one or more DOM elements as images
11 lines • 713 B
TypeScript
import { ImageOptions, Label } from "../types";
/**
* Handles the generation of unique filenames based on a proposed filename and an array of existing filenames.
*
* If the proposed filename is unique, it is added to the filenames array and returned as-is.
* If the proposed filename is not unique, the function will check if it already ends with a "-n" pattern.
* If it does, the function will increment the number until a unique filename is found.
* If it doesn't, the function will start with "-2" and increment the number until a unique filename is found.
*/
export declare function handleFileNames(imageOptions: ImageOptions, filenames: string[]): Label;
//# sourceMappingURL=handle-filenames.d.ts.map