file-url converts a file path to a valid file: URL. Handling platform differences, it ensures compatibility and proper encoding for various operating systems like Windows, macOS, and Linux. This is crucial for referencing local files within web applications or other contexts requiring a URL format. Simplifies creating file URLs, preventing errors caused by incorrect path formatting and escaping. Offers options for encoding and specifying the platform, providing flexibility for diverse scenarios.
The file-url npm package has sporadic releases. Initial versions came out in 2014, with occasional updates through 2017. Version 3.0.0 was released in April 2019, and version 4.0.0 in April 2021. There have been no releases since April 2021. The release frequency is inconsistent, with long periods of inactivity.
File-url npm package downloads show consistent growth from March 2024 to August 2025, ranging from 1.3 million to over 3.6 million. There's a noticeable upward trend, with a significant jump in downloads starting mid-2025. September 2025 downloads are incomplete and significantly lower.