@lifaon/path
Version:
Useful tool to manage paths like the URL object
12 lines • 581 B
JavaScript
import { getStemAndExtEntryPathSegment } from '../../segment/functions/get/get-stem-and-ext-entry-path-segment.js';
import { getBasenameOfPathSegments } from './get-basename-of-path-segments.js';
/**
* Returns the stem and ext tuple of the basename of 'segments'
*/
export function getStemAndExtOfPathSegments(segments, { rootRegExp }) {
const basename = getBasenameOfPathSegments(segments, undefined, {
rootRegExp,
});
return basename === null ? null : getStemAndExtEntryPathSegment(basename);
}
//# sourceMappingURL=get-stem-and-ext-of-path-segments.js.map