Skip to main content

relative()

const relative: (from, to) => string = upath.relative

Solve the relative path from {from} to {to}. At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.

Parameters

ParameterType

from

string

to

string

Returns

string