npm.io
1.0.5 • Published 1 year ago

url-file-url

Licence
Apache-2.0
Version
1.0.5
Deps
2
Size
14 kB
Vulns
0
Weekly
0
Stars
1

url-file-url

Small module that converts from URLs to filenames to URLs

npm install url-file-url

Useful for embedded runtimes with no url module.

Usage

const { fileURLToPath, pathToFileURL } = require('url-file-url')

pathToFileURL('/foo/bar') // file:///foo/bar
fileURLToPath('file:///foo/bar') // /foo/bar

License

Apache-2.0