@stryke/path
Version:
A package containing various utilities that expand the functionality of NodeJs's built-in `path` module
15 lines (13 loc) • 427 B
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
//#region src/is-root-dir.ts
/**
* Check if the directory is the current system's root directory.
*
* @param dir - The directory to check.
* @returns Returns true if the directory is the root directory.
*/
function isSystemRoot(dir) {
return Boolean(dir === "/" || dir === "c:\\" || dir === "C:\\");
}
//#endregion
exports.isSystemRoot = isSystemRoot;