| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 64a0c80 commit c179254
55 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -105,7 +105,7 @@ function ClientRequest(options, cb) { | |||
| 105 | 105 | // when createConnection is provided. | |
| 106 | 106 | } else if (typeof agent.addRequest !== 'function') { | |
| 107 | 107 | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'Agent option', | |
| 108 | - ['Agent-like object', 'undefined', 'false']); | ||
| 108 | + ['Agent-like Object', 'undefined', 'false']); | ||
| 109 | 109 | } | |
| 110 | 110 | this.agent = agent; | |
| 111 | 111 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -652,7 +652,7 @@ function write_(msg, chunk, encoding, callback, fromEnd) { | |||
| 652 | 652 | ||
| 653 | 653 | if (!fromEnd && typeof chunk !== 'string' && !(chunk instanceof Buffer)) { | |
| 654 | 654 | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'first argument', | |
| 655 | - ['string', 'buffer']); | ||
| 655 | + ['string', 'Buffer']); | ||
| 656 | 656 | } | |
| 657 | 657 | ||
| 658 | 658 | ||
@@ -750,7 +750,7 @@ OutgoingMessage.prototype.end = function end(chunk, encoding, callback) { | |||
| 750 | 750 | if (chunk) { | |
| 751 | 751 | if (typeof chunk !== 'string' && !(chunk instanceof Buffer)) { | |
| 752 | 752 | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'first argument', | |
| 753 | - ['string', 'buffer']); | ||
| 753 | + ['string', 'Buffer']); | ||
| 754 | 754 | } | |
| 755 | 755 | if (!this._header) { | |
| 756 | 756 | if (typeof chunk === 'string') | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -845,7 +845,7 @@ function Server(options, listener) { | |||
| 845 | 845 | } else if (options == null || typeof options === 'object') { | |
| 846 | 846 | options = options || {}; | |
| 847 | 847 | } else { | |
| 848 | - throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'options', 'object'); | ||
| 848 | + throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'options', 'Object'); | ||
| 849 | 849 | } | |
| 850 | 850 | ||
| 851 | 851 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -166,7 +166,7 @@ function innerThrows(shouldThrow, block, expected, message) { | |||
| 166 | 166 | var details = ''; | |
| 167 | 167 | ||
| 168 | 168 | if (typeof block !== 'function') { | |
| 169 | - throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'block', 'function', | ||
| 169 | + throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'block', 'Function', | ||
| 170 | 170 | block); | |
| 171 | 171 | } | |
| 172 | 172 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -199,7 +199,7 @@ Buffer.from = function from(value, encodingOrOffset, length) { | |||
| 199 | 199 | throw new errors.TypeError( | |
| 200 | 200 | 'ERR_INVALID_ARG_TYPE', | |
| 201 | 201 | 'first argument', | |
| 202 | - ['string', 'buffer', 'arrayBuffer', 'array', 'array-like object'], | ||
| 202 | + ['string', 'Buffer', 'ArrayBuffer', 'Array', 'Array-like Object'], | ||
| 203 | 203 | value | |
| 204 | 204 | ); | |
| 205 | 205 | } | |
@@ -226,7 +226,7 @@ Buffer.from = function from(value, encodingOrOffset, length) { | |||
| 226 | 226 | throw new errors.TypeError( | |
| 227 | 227 | 'ERR_INVALID_ARG_TYPE', | |
| 228 | 228 | 'first argument', | |
| 229 | - ['string', 'buffer', 'arrayBuffer', 'array', 'array-like object'], | ||
| 229 | + ['string', 'Buffer', 'ArrayBuffer', 'Array', 'Array-like Object'], | ||
| 230 | 230 | value | |
| 231 | 231 | ); | |
| 232 | 232 | }; | |
@@ -429,7 +429,7 @@ Buffer.isBuffer = function isBuffer(b) { | |||
| 429 | 429 | Buffer.compare = function compare(a, b) { | |
| 430 | 430 | if (!isUint8Array(a) || !isUint8Array(b)) { | |
| 431 | 431 | throw new errors.TypeError( | |
| 432 | - 'ERR_INVALID_ARG_TYPE', ['buf1', 'buf2'], ['buffer', 'uint8Array'] | ||
| 432 | + 'ERR_INVALID_ARG_TYPE', ['buf1', 'buf2'], ['Buffer', 'Uint8Array'] | ||
| 433 | 433 | ); | |
| 434 | 434 | } | |
| 435 | 435 | ||
@@ -448,7 +448,7 @@ Buffer.isEncoding = function isEncoding(encoding) { | |||
| 448 | 448 | Buffer[kIsEncodingSymbol] = Buffer.isEncoding; | |
| 449 | 449 | ||
| 450 | 450 | const kConcatErr = new errors.TypeError( | |
| 451 | - 'ERR_INVALID_ARG_TYPE', 'list', ['array', 'buffer', 'uint8Array'] | ||
| 451 | + 'ERR_INVALID_ARG_TYPE', 'list', ['Array', 'Buffer', 'Uint8Array'] | ||
| 452 | 452 | ); | |
| 453 | 453 | ||
| 454 | 454 | Buffer.concat = function concat(list, length) { | |
@@ -509,7 +509,7 @@ function byteLength(string, encoding) { | |||
| 509 | 509 | ||
| 510 | 510 | throw new errors.TypeError( | |
| 511 | 511 | 'ERR_INVALID_ARG_TYPE', 'string', | |
| 512 | - ['string', 'buffer', 'arrayBuffer'], string | ||
| 512 | + ['string', 'Buffer', 'ArrayBuffer'], string | ||
| 513 | 513 | ); | |
| 514 | 514 | } | |
| 515 | 515 | ||
@@ -671,7 +671,7 @@ Buffer.prototype.equals = function equals(b) { | |||
| 671 | 671 | if (!isUint8Array(b)) { | |
| 672 | 672 | throw new errors.TypeError( | |
| 673 | 673 | 'ERR_INVALID_ARG_TYPE', 'otherBuffer', | |
| 674 | - ['buffer', 'uint8Array'], b | ||
| 674 | + ['Buffer', 'Uint8Array'], b | ||
| 675 | 675 | ); | |
| 676 | 676 | } | |
| 677 | 677 | if (this === b) | |
@@ -700,7 +700,7 @@ Buffer.prototype.compare = function compare(target, | |||
| 700 | 700 | if (!isUint8Array(target)) { | |
| 701 | 701 | throw new errors.TypeError( | |
| 702 | 702 | 'ERR_INVALID_ARG_TYPE', 'target', | |
| 703 | - ['buffer', 'uint8Array'], target | ||
| 703 | + ['Buffer', 'Uint8Array'], target | ||
| 704 | 704 | ); | |
| 705 | 705 | } | |
| 706 | 706 | if (arguments.length === 1) | |
@@ -783,7 +783,7 @@ function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { | |||
| 783 | 783 | ||
| 784 | 784 | throw new errors.TypeError( | |
| 785 | 785 | 'ERR_INVALID_ARG_TYPE', 'value', | |
| 786 | - ['string', 'buffer', 'uint8Array'], val | ||
| 786 | + ['string', 'Buffer', 'Uint8Array'], val | ||
| 787 | 787 | ); | |
| 788 | 788 | } | |
| 789 | 789 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,7 +63,7 @@ function newHandle(type, lookup) { | |||
| 63 | 63 | if (lookup === undefined) | |
| 64 | 64 | lookup = dns.lookup; | |
| 65 | 65 | else if (typeof lookup !== 'function') | |
| 66 | - throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'lookup', 'function'); | ||
| 66 | + throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'lookup', 'Function'); | ||
| 67 | 67 | ||
| 68 | 68 | if (type === 'udp4') { | |
| 69 | 69 | const handle = new UDP(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -133,7 +133,7 @@ function lookup(hostname, options, callback) { | |||
| 133 | 133 | // Parse arguments | |
| 134 | 134 | if (hostname && typeof hostname !== 'string') { | |
| 135 | 135 | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'hostname', | |
| 136 | - ['string', 'falsey'], hostname); | ||
| 136 | + ['string', 'falsy'], hostname); | ||
| 137 | 137 | } else if (typeof options === 'function') { | |
| 138 | 138 | callback = options; | |
| 139 | 139 | family = 0; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -243,7 +243,7 @@ function _addListener(target, type, listener, prepend) { | |||
| 243 | 243 | ||
| 244 | 244 | if (typeof listener !== 'function') { | |
| 245 | 245 | const errors = lazyErrors(); | |
| 246 | - throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener', 'function'); | ||
| 246 | + throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener', 'Function'); | ||
| 247 | 247 | } | |
| 248 | 248 | ||
| 249 | 249 | events = target._events; | |
@@ -344,7 +344,7 @@ function _onceWrap(target, type, listener) { | |||
| 344 | 344 | EventEmitter.prototype.once = function once(type, listener) { | |
| 345 | 345 | if (typeof listener !== 'function') { | |
| 346 | 346 | const errors = lazyErrors(); | |
| 347 | - throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener', 'function'); | ||
| 347 | + throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener', 'Function'); | ||
| 348 | 348 | } | |
| 349 | 349 | this.on(type, _onceWrap(this, type, listener)); | |
| 350 | 350 | return this; | |
@@ -355,7 +355,7 @@ EventEmitter.prototype.prependOnceListener = | |||
| 355 | 355 | if (typeof listener !== 'function') { | |
| 356 | 356 | const errors = lazyErrors(); | |
| 357 | 357 | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener', | |
| 358 | - 'function'); | ||
| 358 | + 'Function'); | ||
| 359 | 359 | } | |
| 360 | 360 | this.prependListener(type, _onceWrap(this, type, listener)); | |
| 361 | 361 | return this; | |
@@ -369,7 +369,7 @@ EventEmitter.prototype.removeListener = | |||
| 369 | 369 | if (typeof listener !== 'function') { | |
| 370 | 370 | const errors = lazyErrors(); | |
| 371 | 371 | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener', | |
| 372 | - 'function'); | ||
| 372 | + 'Function'); | ||
| 373 | 373 | } | |
| 374 | 374 | ||
| 375 | 375 | events = this._events; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -86,7 +86,7 @@ function getOptions(options, defaultOptions) { | |||
| 86 | 86 | } else if (typeof options !== 'object') { | |
| 87 | 87 | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', | |
| 88 | 88 | 'options', | |
| 89 | - ['string', 'object'], | ||
| 89 | + ['string', 'Object'], | ||
| 90 | 90 | options); | |
| 91 | 91 | } | |
| 92 | 92 | ||
@@ -1209,7 +1209,7 @@ function toUnixTimestamp(time) { | |||
| 1209 | 1209 | } | |
| 1210 | 1210 | throw new errors.Error('ERR_INVALID_ARG_TYPE', | |
| 1211 | 1211 | 'time', | |
| 1212 | - ['Date', 'time in seconds'], | ||
| 1212 | + ['Date', 'Time in seconds'], | ||
| 1213 | 1213 | time); | |
| 1214 | 1214 | } | |
| 1215 | 1215 | ||
@@ -1513,7 +1513,7 @@ fs.watchFile = function(filename, options, listener) { | |||
| 1513 | 1513 | if (typeof listener !== 'function') { | |
| 1514 | 1514 | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', | |
| 1515 | 1515 | 'listener', | |
| 1516 | - 'function', | ||
| 1516 | + 'Function', | ||
| 1517 | 1517 | listener); | |
| 1518 | 1518 | } | |
| 1519 | 1519 | ||
@@ -1922,7 +1922,7 @@ fs.copyFile = function(src, dest, flags, callback) { | |||
| 1922 | 1922 | callback = flags; | |
| 1923 | 1923 | flags = 0; | |
| 1924 | 1924 | } else if (typeof callback !== 'function') { | |
| 1925 | - throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'callback', 'function'); | ||
| 1925 | + throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'callback', 'Function'); | ||
| 1926 | 1926 | } | |
| 1927 | 1927 | ||
| 1928 | 1928 | src = getPathFromURL(src); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,7 +56,7 @@ class Session extends EventEmitter { | |||
| 56 | 56 | } | |
| 57 | 57 | if (params && typeof params !== 'object') { | |
| 58 | 58 | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', | |
| 59 | - 'params', 'object', params); | ||
| 59 | + 'params', 'Object', params); | ||
| 60 | 60 | } | |
| 61 | 61 | if (callback && typeof callback !== 'function') { | |
| 62 | 62 | throw new errors.TypeError('ERR_INVALID_CALLBACK'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments