Skip to content

nsuite v2.2.1


nsuite / getDirname

Function: getDirname() ​

getDirname(metaUrl): string

Defined in: UtilsPath.ts:35

Returns the directory name of the given file URL.

Parameters ​

metaUrl ​

string

The file URL to extract the directory name from.

Returns ​

string

The directory name of the given file URL.

Example ​

ts
import { getDirname } from "nsuite";
const __dirname = getDirname(import.meta.url);

Released under the Apache-2.0 License.