Platform agnostic method to get the folder name from a path string (dirname); returns the folder of the path treating both / as well as \ as directory separators.
Parameters
pathLike: string
path like string
Optionaldepth: number
Optional depth to go up in the path, defaults to 1 which returns the parent folder of the path
Platform agnostic method to get the folder name from a path string (dirname); returns the folder of the path treating both / as well as \ as directory separators.