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

x/ayonli_jsext/path.ts>isWindowsPath

A JavaScript extension package for building strong and modern applications.
Latest
function isWindowsPath
Re-export
import { isWindowsPath } from "https://deno.land/x/ayonli_jsext@v0.9.72/path.ts";

Checks if the given path is a Windows specific path.

Examples

Example 1

import { isWindowsPath } from "@ayonli/jsext/path";

console.assert(isWindowsPath("C:\\Windows\\System32"));
console.assert(isWindowsPath("c:\\Windows\\System32")); // case-insensitive on volume
console.assert(isWindowsPath("D:/Program Files")); // forward slash is also valid
console.assert(isWindowsPath("E:")); // volume without path is also valid

Parameters

path: string

Returns

boolean