GitShow/sindresorhus/file-url
sindresorhus

file-url

Convert a file path to a file URL: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`

by sindresorhus
Star on GitHubForknpm

JavaScript

63 stars10 forks7 contributorsQuiet · 2y agoSince 2014v4.0.0MIT

Meet the team

See all 7 on GitHub →
sindresorhus
sindresorhus23 contributions
arthurvr
arthurvr1 contribution
dciccale
dciccale1 contribution
BendingBender
BendingBender1 contribution
felixfbecker
felixfbecker1 contribution
kevinoid
kevinoid1 contribution
Richienb
Richienb1 contribution

Languages

View on GitHub →
JavaScript88.4%
TypeScript11.6%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
mroch
Only convert backslashes to slashes on Windows?ClosedIssue

I was comparing this module to vscode-uri, and one major difference is that vscode-uri only converts to on Windows. on other platforms, it says, is a valid segment character, like . I didn't confirm if that's true (sorry for being lazy!) but thought I'd bring it up. https://github.com/microsoft/vscode-uri/blob/413805221cc6ed167186ab3103d3248d6f7161f2/src/index.ts#L744-L769

mroch · 11mo ago
mifi
Don't convert backslashesMergedPR

not sure why it was added in the first place but it seems to be causing problems here: https://github.com/mifi/lossless-cut/issues/1941 e.g. on macos when trying to encode a file name with a backslash in it, it causes the backslashe to interpreted as forward slashes, which is not correct and causes the process opening the file to fail. example: it should become

mifi · 2y ago
timothytripp
Removed exports section and added dependent package pathMergedPR

1. This package has a dependency on the package 'path' but it was not declared as a dependency in the package.json 2. With Node 14 or higher, declaring the exports section in the package.json without also including the package.json file itself will generate a warning during build. Removing the exports section from the package.json resolves the warning. See https://github.com/react-native-community/cli/issues/1168 for more details.

timothytripp · 3y ago
Structured data for AI agents

Repository: sindresorhus/file-url. Description: Convert a file path to a file URL: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg` Stars: 63, Forks: 10. Primary language: JavaScript. Languages: JavaScript (88.4%), TypeScript (11.6%). License: MIT. Latest release: v4.0.0 (5y ago). Open PRs: 0, open issues: 0. Last activity: 2y ago. Community health: 85%. Top contributors: sindresorhus, arthurvr, dciccale, BendingBender, felixfbecker, kevinoid, Richienb.

·@ofershap

Replace github.com with gitshow.dev