• Solve the relative path from {from} to {to}.

    Parameters

    • from: string

      The source path.

    • to: string

      The target path.

      Notes

      If from and to each resolve to the same path (after calling path.resolve() on each), a zero-length string is returned. If a zero-length string is passed as from or to, / will be used instead of the zero-length strings.

    Returns string