path-root is a lightweight npm package designed to extract the root directory from a given file path. It reliably identifies the root, handling various path formats including Windows drives (C:\), UNC paths (\\\\server\share), and POSIX roots (/). It offers a simple and efficient solution for determining the base of a file path, facilitating operations like path normalization or security checks. This functionality is crucial for applications that need to understand the hierarchical structure of file systems.