mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
lib, url: add a windows
option to path parsing
PR-URL: https://github.com/nodejs/node/pull/52509 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: LiviaMedeiros <livia@cirno.name>
This commit is contained in:
parent
91dc8c93a3
commit
ac9aa37bcb
6 changed files with 267 additions and 216 deletions
|
@ -1020,10 +1020,10 @@ Url.prototype.parseHost = function parseHost() {
|
|||
// When used internally, we are not obligated to associate TypeError with
|
||||
// this function, so non-strings can be rejected by underlying implementation.
|
||||
// Public API has to validate input and throw appropriate error.
|
||||
function pathToFileURL(path) {
|
||||
function pathToFileURL(path, options) {
|
||||
validateString(path, 'path');
|
||||
|
||||
return _pathToFileURL(path);
|
||||
return _pathToFileURL(path, options);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue