Function: join()
ts
function join(...paths): string;Combines an array of path segments into a single path string, with forward slashes (/) as separators.
Parameters
| Parameter | Type | Description |
|---|---|---|
...paths | string[] | An array of path segments to join. |
Returns
string
A combined path string.
Since
1.0.0
Example
ts
join('foo', 'bar', 'baz') // => 'foo/bar/baz'
join('foo/', '/bar') // => 'foo/bar'