Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/path.js

A JavaScript extension package for building strong and modern applications.
Latest
import * as ayonliJsext from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/path.js";

Variables

Platform-specific path segment separator. The value is \ in Windows server-side environments, and / elsewhere.

Functions

Return the last portion of the given path. Trailing directory separators are ignored, and optional suffix is removed.

Checks if the path contains the given sub path.

Returns the current working directory.

Returns the parent path of the given path.

Checks if the path ends with the given sub path.

Checks if the path1 and path2 describe the same path.

Returns the extension of the path with leading period.

Checks if the given path is an absolute path.

Checks if the given string is a file URL, whether with or without //.

Checks if the given path is a file system path.

Checks if the given path is a Posix specific path.

Checks if the given string is a URL, whether standard or non-standard.

Checks if the given path is a Windows specific path.

Concatenates all given segments into a well-formed path.

f
normalize
deprecated

This function is similar to Node.js implementation, but does not preserve trailing slashes.

Resolves path segments into a well-formed path.

Similar to normalize, but also remove the search string and hash string if present.

Splits the path into well-formed segments.

Checks if the path starts with the given sub path.

Converts the given path to a file URL if it's not one already.

Converts the given URL to a file system path if it's not one already.