FileFilter A filter function for file paths only.
11 declarations
FileFilter A filter function for file paths only.
(path: string): string[] pathstringstring[] (raw_path: string): PathPiece[] Treats all paths as absolute, so the first piece is always a '/' with type 'separator'.
raw_pathstringPathPiece[] (path: string): string[] Gets the individual parts of a path, ignoring dots and separators.
pathstringstring[] PathFilter A filter function for paths, can distinguish between files and directories.
PathId An absolute path on the filesystem. Named "id" to be consistent with Rollup.
PathInfo Basic information about a filesystem path.
idis_directorybooleanPathPiece A piece of a parsed path, either a path segment or separator.
ResolvedPath A resolved path with both the original path string and its absolute id.
pathstring(str: string, map_special_characters?: boolean): string Converts a string into a URL-compatible slug.
strthe string to convert
stringmap_special_charactersif true, characters like ñ are converted to their ASCII equivalents, runs around 5x faster when disabled
booleantruestring (path_or_url: string | URL): string Converts a URL to a file path string, or returns the string as-is.
path_or_urlstring | URLstring