Skip to content

getFolderName

Gets the folder name from the import(dot)meta(dot)url, converting it to a POSIX-style path.

Import:

import { getFolderName } from '@mnaoumov/typescript-lib/path';

Signature:

function getFolderName(importMetaUrl: string): string

Parameters:

Parameter Type Description
importMetaUrl string The import(dot)meta(dot)url from which to extract the folder name.

Returns: string — The POSIX-style folder name.