aboutsummaryrefslogtreecommitdiff
path: root/node_modules/filenamify/index.d.ts
blob: 9f6ce0a88be9ea89cfdc40dad5b05cc8113502a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export interface Options {
	/**
	 * String to use as replacement for reserved filename characters.
	 *
	 * Cannot contain: `<` `>` `:` `"` `/` `\` `|` `?` `*`
	 *
	 * @default '!'
	 */
	readonly replacement?: string;
}

/**
 * Accepts a filename and returns a valid filename.
 *
 * @param input - A string to convert to a valid filename.
 */
export interface Filenamify {
	(input: string, options?: Options): string;

	/**
	 * Accepts a path and returns the path with a valid filename.
	 *
	 * @param input - A string to convert to a valid path with a filename.
	 */
	path(input: string, options?: Options): string;
}

declare const filenamify: Filenamify;

export default filenamify;