@lifaon/path
Version:
Useful tool to manage paths like the URL object
10 lines (9 loc) • 492 B
TypeScript
import type { IPathSegments } from '../../../../types/segments/path-segments.type.js';
import type { IStemAndExtTuple } from '../../../../types/stem-and-ext-tuple.type.js';
export interface IGetStemAndExtOfPathSegmentsOptions {
readonly rootRegExp: RegExp;
}
/**
* Returns the stem and ext tuple of the basename of 'segments'
*/
export declare function getStemAndExtOfPathSegments(segments: IPathSegments, { rootRegExp }: IGetStemAndExtOfPathSegmentsOptions): IStemAndExtTuple | null;