urlToFilepath(url[, options])
urlToFilepath(
'https://projects.pixelastic.com/firost/index.html?version=1'
);
// https/projects.pixelastic.com/firost/index_version-1.html
You can overwrite the file extension by setting options.extension
.
urlToFilepath(
'https://projects.pixelastic.com/firost?version=1',
{
extension: 'html'
}
);
// https/projects.pixelastic.com/firost_version-1.html
If the resulting filename is longer than 255 characters, it will be
automatically reduced to avoid triggering ENAMETOOLONG
errors.