| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent eb7c932 commit 4884991
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -362,6 +362,7 @@ process.emitWarning = emitWarning; | |||
| 362 | 362 | require('fs'); | |
| 363 | 363 | require('v8'); | |
| 364 | 364 | require('vm'); | |
| 365 | + require('url'); | ||
| 365 | 366 | ||
| 366 | 367 | function setupPrepareStackTrace() { | |
| 367 | 368 | const { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,8 +70,7 @@ const { | |||
| 70 | 70 | validateObject, | |
| 71 | 71 | } = require('internal/validators'); | |
| 72 | 72 | ||
| 73 | - // Lazy loaded for startup performance. | ||
| 74 | - let querystring; | ||
| 73 | + const querystring = require('querystring'); | ||
| 75 | 74 | ||
| 76 | 75 | const { platform } = process; | |
| 77 | 76 | const isWindows = platform === 'win32'; | |
@@ -1046,7 +1045,6 @@ function parseParams(qs) { | |||
| 1046 | 1045 | } else if (encodeCheck > 0) { | |
| 1047 | 1046 | if (isHexTable[code] === 1) { | |
| 1048 | 1047 | if (++encodeCheck === 3) { | |
| 1049 | - querystring = require('querystring'); | ||
| 1050 | 1048 | encoded = true; | |
| 1051 | 1049 | } | |
| 1052 | 1050 | } else { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,6 +32,7 @@ const { | |||
| 32 | 32 | ||
| 33 | 33 | const { toASCII } = require('internal/idna'); | |
| 34 | 34 | const { encodeStr, hexTable } = require('internal/querystring'); | |
| 35 | + const querystring = require('querystring'); | ||
| 35 | 36 | ||
| 36 | 37 | const { | |
| 37 | 38 | ERR_INVALID_ARG_TYPE | |
@@ -148,9 +149,6 @@ const { | |||
| 148 | 149 | CHAR_AT, | |
| 149 | 150 | } = require('internal/constants'); | |
| 150 | 151 | ||
| 151 | - // Lazy loaded for startup performance. | ||
| 152 | - let querystring; | ||
| 153 | - | ||
| 154 | 152 | function urlParse(url, parseQueryString, slashesDenoteHost) { | |
| 155 | 153 | if (url instanceof Url) return url; | |
| 156 | 154 | ||
@@ -256,7 +254,6 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) { | |||
| 256 | 254 | if (simplePath[2]) { | |
| 257 | 255 | this.search = simplePath[2]; | |
| 258 | 256 | if (parseQueryString) { | |
| 259 | - if (querystring === undefined) querystring = require('querystring'); | ||
| 260 | 257 | this.query = querystring.parse(this.search.slice(1)); | |
| 261 | 258 | } else { | |
| 262 | 259 | this.query = this.search.slice(1); | |
@@ -445,7 +442,6 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) { | |||
| 445 | 442 | this.query = rest.slice(questionIdx + 1, hashIdx); | |
| 446 | 443 | } | |
| 447 | 444 | if (parseQueryString) { | |
| 448 | - if (querystring === undefined) querystring = require('querystring'); | ||
| 449 | 445 | this.query = querystring.parse(this.query); | |
| 450 | 446 | } | |
| 451 | 447 | } else if (parseQueryString) { | |
@@ -610,7 +606,6 @@ Url.prototype.format = function format() { | |||
| 610 | 606 | } | |
| 611 | 607 | ||
| 612 | 608 | if (this.query !== null && typeof this.query === 'object') { | |
| 613 | - if (querystring === undefined) querystring = require('querystring'); | ||
| 614 | 609 | query = querystring.stringify(this.query); | |
| 615 | 610 | } | |
| 616 | 611 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -116,6 +116,7 @@ const expectedModules = new Set([ | |||
| 116 | 116 | 'NativeModule internal/blob', | |
| 117 | 117 | 'NativeModule async_hooks', | |
| 118 | 118 | 'NativeModule path', | |
| 119 | + 'NativeModule querystring', | ||
| 119 | 120 | 'NativeModule stream', | |
| 120 | 121 | 'NativeModule stream/promises', | |
| 121 | 122 | 'NativeModule string_decoder', | |
| Back | FazBrowse Home | New Git URL |
0 commit comments