UNPKG

@lifaon/path

Version:

Useful tool to manage paths like the URL object

11 lines (10 loc) 605 B
import type { IPathSegments } from '../../../../types/segments/path-segments.type.js'; import { type IPushSegmentIntoMutablePathSegmentsOptions } from '../mutate/push-segment-into-mutable-path-segments.js'; export interface IGetRelativePathSegmentsOptions extends IPushSegmentIntoMutablePathSegmentsOptions { } /** * Returns the relative `IPathSegments` between `from` and `to`: * - if no common base path => `[]` * - else `['..' | '.', ...]` */ export declare function getRelativePathSegments(from: IPathSegments, to: IPathSegments, options: IGetRelativePathSegmentsOptions): IPathSegments | null;