file-url
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -24,3 +24,5 @@ 'use strict'; | ||
return encodeURI(`file://${pathName}`); | ||
// Escape required characters for path components | ||
// See: https://tools.ietf.org/html/rfc3986#section-3.3 | ||
return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent); | ||
}; |
{ | ||
"name": "file-url", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Convert a path to a file url: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`", | ||
@@ -32,6 +32,3 @@ "license": "MIT", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"esnext": true | ||
} | ||
} |
3189
20