This library wraps the routes library and exposes the same methods with the slash method, to use slash as the default separator.
npm install slash-path
js
// import path from "path";
import path from "slash-path";
const filePath = path.resolve("./file.txt");
console.log("path: ", filePath);
// output
// path: c:/path/to/ptoject/file.txt
``