Advanced
Returns the last portion of a path
The path to test
Optional
ext: stringOptional extension to remove
Returns the directory name of a path
The path to parse
Returns the extension of the path, from the last occurrence of the . (period) character to end of string in the last portion of the path. If there is no . in the last portion of the path, or if there are no . characters other than the first character of the basename of path, an empty string is returned.
The path to parse
Returns the protocol of the path e.g. http://, https://, file:///, data:, blob:, C:/
The path to get the protocol from
Checks if the path has a protocol e.g. http://, https://, file:///, data:, blob:, C:/ This will return true for windows file paths
The path to check
Determines if path is an absolute path. Absolute paths can be urls, data urls, or paths on disk
The path to test
Checks if the path is a blob URL
The path to check
Checks if the path is a data URL
The path to check
Checks if the path is a URL e.g. http://, https://
The path to check
Joins all given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path
The segments of the path to join
Normalizes the given path, resolving '..' and '.' segments
The path to normalize
Parses a path into an object containing the 'root', dir
, base
, ext
, and name
properties.
The path to parse
Returns the root of the path e.g. /, C:/, file:///, http://domain.com/
The path to parse
Converts URL to an absolute path. When loading from a Web Worker, we must use absolute paths. If the URL is already absolute we return it as is If it's not, we convert it
The URL to test
Optional
baseUrl: stringThe base URL to use
Optional
rootUrl: stringThe root URL to use
Converts a path to posix format.
The path to convert to posix
Path utilities for working with URLs and file paths in a cross-platform way. All paths that are passed in will become normalized to have posix separators.