quetch / splitPath
splitPath(
separator
,separatorEscape
,path
): readonlystring
[]
Splits a path
string using the separator
, omitting those prefixed with a separatorEscape
.
If path
is undefined
, returns a function that takes path
and splits it according to the provided separator
and separatorEscape
arguments.
undefined
| string
undefined
| string
string
The path string to split.
readonly string
[]
An array containing the splitted path items if path
is defined, or a function that takes a path
string and returns an array.
splitPath(
separator
?,separatorEscape
?):PathSplitter
Splits a path
string using the separator
, omitting those prefixed with a separatorEscape
.
If path
is undefined
, returns a function that takes path
and splits it according to the provided separator
and separatorEscape
arguments.
string
The separator string to use (defaults to "/"
).
string
The separator escape string to use (default to "\\"
).
PathSplitter
An array containing the splitted path items if path
is defined, or a function that takes a path
string and returns an array.