Check if a path exists on the file system. path-exists offers a simple yet crucial utility for Node.js projects. It asynchronously and synchronously determines if a provided file or directory path exists. Useful for file system operations, build scripts, and testing. Offers a cleaner, more direct API compared to native fs.existsSync. Enhances code readability and reduces boilerplate for common file existence checks.
The npm package path-exists has sporadic releases. Initial versions were released between May 2015 and November 2015. Version 3.0.0 came out in May 2016, version 4.0.0 in April 2019, and version 5.0.0 in August 2021. There have been no releases since August 2021.
Path-exists downloads exhibited steady growth from March 2024 to May 2025, peaking in June 2025. July and August 2025 saw decreased downloads, while September 2025's incomplete data suggests a further decline, but this may change as the month progresses.