Skip to content

toRelativeFromRoot

Converts an absolute path to a relative path from the root folder of the project.

Import:

import { toRelativeFromRoot } from '@mnaoumov/typescript-dev-toolkit/root';

Signature:

function toRelativeFromRoot(params: ToRelativeFromRootParams): string | null

Parameters:

Parameter Type Description
params ToRelativeFromRootParams The parameters for the function.

Returns: string | null — The relative path from the root folder.


Links to this page: