Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@dogmalang/path

dogmalang240.1.0

Utilities for working with file and directory paths.

fs, file system, Dogma

readme

@dogmalang/path

NPM version Total downloads

Utilities for working with file and directory paths.

Developed in Dogma, compiled to JavaScript.

Engineered in Valencia, Spain, EU by Justo Labs.

dir()

Return the parent directory path:

fn dir(...path) : text

base()

Return the entry name, with extension if file:

fn base(...path) : text

name()

Return the entry name, without extension if file:

fn name(...path) : text

ext()

Return the entry extension, with .:

fn ext(...path) : text

join()

Join a path from multiple parts:

fn join(...path) : text

normalize()

Normalize a path, resolving .. and .:

fn normalize(...path) : text