| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6806ebb commit edb29b8
36 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,6 +58,7 @@ rules: | |||
| 58 | 58 | comma-spacing: 2 | |
| 59 | 59 | eol-last: 2 | |
| 60 | 60 | indent: [2, 2, {SwitchCase: 1}] | |
| 61 | + key-spacing: [2, {mode: "minimum"}] | ||
| 61 | 62 | keyword-spacing: 2 | |
| 62 | 63 | max-len: [2, 80, 2] | |
| 63 | 64 | new-parens: 2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,68 +15,68 @@ const httpSocketSetup = common.httpSocketSetup; | |||
| 15 | 15 | const OutgoingMessage = require('_http_outgoing').OutgoingMessage; | |
| 16 | 16 | ||
| 17 | 17 | const STATUS_CODES = exports.STATUS_CODES = { | |
| 18 | - 100 : 'Continue', | ||
| 19 | - 101 : 'Switching Protocols', | ||
| 20 | - 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918 | ||
| 21 | - 200 : 'OK', | ||
| 22 | - 201 : 'Created', | ||
| 23 | - 202 : 'Accepted', | ||
| 24 | - 203 : 'Non-Authoritative Information', | ||
| 25 | - 204 : 'No Content', | ||
| 26 | - 205 : 'Reset Content', | ||
| 27 | - 206 : 'Partial Content', | ||
| 28 | - 207 : 'Multi-Status', // RFC 4918 | ||
| 29 | - 208 : 'Already Reported', | ||
| 30 | - 226 : 'IM Used', | ||
| 31 | - 300 : 'Multiple Choices', | ||
| 32 | - 301 : 'Moved Permanently', | ||
| 33 | - 302 : 'Found', | ||
| 34 | - 303 : 'See Other', | ||
| 35 | - 304 : 'Not Modified', | ||
| 36 | - 305 : 'Use Proxy', | ||
| 37 | - 307 : 'Temporary Redirect', | ||
| 38 | - 308 : 'Permanent Redirect', // RFC 7238 | ||
| 39 | - 400 : 'Bad Request', | ||
| 40 | - 401 : 'Unauthorized', | ||
| 41 | - 402 : 'Payment Required', | ||
| 42 | - 403 : 'Forbidden', | ||
| 43 | - 404 : 'Not Found', | ||
| 44 | - 405 : 'Method Not Allowed', | ||
| 45 | - 406 : 'Not Acceptable', | ||
| 46 | - 407 : 'Proxy Authentication Required', | ||
| 47 | - 408 : 'Request Timeout', | ||
| 48 | - 409 : 'Conflict', | ||
| 49 | - 410 : 'Gone', | ||
| 50 | - 411 : 'Length Required', | ||
| 51 | - 412 : 'Precondition Failed', | ||
| 52 | - 413 : 'Payload Too Large', | ||
| 53 | - 414 : 'URI Too Long', | ||
| 54 | - 415 : 'Unsupported Media Type', | ||
| 55 | - 416 : 'Range Not Satisfiable', | ||
| 56 | - 417 : 'Expectation Failed', | ||
| 57 | - 418 : 'I\'m a teapot', // RFC 2324 | ||
| 58 | - 421 : 'Misdirected Request', | ||
| 59 | - 422 : 'Unprocessable Entity', // RFC 4918 | ||
| 60 | - 423 : 'Locked', // RFC 4918 | ||
| 61 | - 424 : 'Failed Dependency', // RFC 4918 | ||
| 62 | - 425 : 'Unordered Collection', // RFC 4918 | ||
| 63 | - 426 : 'Upgrade Required', // RFC 2817 | ||
| 64 | - 428 : 'Precondition Required', // RFC 6585 | ||
| 65 | - 429 : 'Too Many Requests', // RFC 6585 | ||
| 66 | - 431 : 'Request Header Fields Too Large', // RFC 6585 | ||
| 67 | - 451 : 'Unavailable For Legal Reasons', | ||
| 68 | - 500 : 'Internal Server Error', | ||
| 69 | - 501 : 'Not Implemented', | ||
| 70 | - 502 : 'Bad Gateway', | ||
| 71 | - 503 : 'Service Unavailable', | ||
| 72 | - 504 : 'Gateway Timeout', | ||
| 73 | - 505 : 'HTTP Version Not Supported', | ||
| 74 | - 506 : 'Variant Also Negotiates', // RFC 2295 | ||
| 75 | - 507 : 'Insufficient Storage', // RFC 4918 | ||
| 76 | - 508 : 'Loop Detected', | ||
| 77 | - 509 : 'Bandwidth Limit Exceeded', | ||
| 78 | - 510 : 'Not Extended', // RFC 2774 | ||
| 79 | - 511 : 'Network Authentication Required' // RFC 6585 | ||
| 18 | + 100: 'Continue', | ||
| 19 | + 101: 'Switching Protocols', | ||
| 20 | + 102: 'Processing', // RFC 2518, obsoleted by RFC 4918 | ||
| 21 | + 200: 'OK', | ||
| 22 | + 201: 'Created', | ||
| 23 | + 202: 'Accepted', | ||
| 24 | + 203: 'Non-Authoritative Information', | ||
| 25 | + 204: 'No Content', | ||
| 26 | + 205: 'Reset Content', | ||
| 27 | + 206: 'Partial Content', | ||
| 28 | + 207: 'Multi-Status', // RFC 4918 | ||
| 29 | + 208: 'Already Reported', | ||
| 30 | + 226: 'IM Used', | ||
| 31 | + 300: 'Multiple Choices', | ||
| 32 | + 301: 'Moved Permanently', | ||
| 33 | + 302: 'Found', | ||
| 34 | + 303: 'See Other', | ||
| 35 | + 304: 'Not Modified', | ||
| 36 | + 305: 'Use Proxy', | ||
| 37 | + 307: 'Temporary Redirect', | ||
| 38 | + 308: 'Permanent Redirect', // RFC 7238 | ||
| 39 | + 400: 'Bad Request', | ||
| 40 | + 401: 'Unauthorized', | ||
| 41 | + 402: 'Payment Required', | ||
| 42 | + 403: 'Forbidden', | ||
| 43 | + 404: 'Not Found', | ||
| 44 | + 405: 'Method Not Allowed', | ||
| 45 | + 406: 'Not Acceptable', | ||
| 46 | + 407: 'Proxy Authentication Required', | ||
| 47 | + 408: 'Request Timeout', | ||
| 48 | + 409: 'Conflict', | ||
| 49 | + 410: 'Gone', | ||
| 50 | + 411: 'Length Required', | ||
| 51 | + 412: 'Precondition Failed', | ||
| 52 | + 413: 'Payload Too Large', | ||
| 53 | + 414: 'URI Too Long', | ||
| 54 | + 415: 'Unsupported Media Type', | ||
| 55 | + 416: 'Range Not Satisfiable', | ||
| 56 | + 417: 'Expectation Failed', | ||
| 57 | + 418: 'I\'m a teapot', // RFC 2324 | ||
| 58 | + 421: 'Misdirected Request', | ||
| 59 | + 422: 'Unprocessable Entity', // RFC 4918 | ||
| 60 | + 423: 'Locked', // RFC 4918 | ||
| 61 | + 424: 'Failed Dependency', // RFC 4918 | ||
| 62 | + 425: 'Unordered Collection', // RFC 4918 | ||
| 63 | + 426: 'Upgrade Required', // RFC 2817 | ||
| 64 | + 428: 'Precondition Required', // RFC 6585 | ||
| 65 | + 429: 'Too Many Requests', // RFC 6585 | ||
| 66 | + 431: 'Request Header Fields Too Large', // RFC 6585 | ||
| 67 | + 451: 'Unavailable For Legal Reasons', | ||
| 68 | + 500: 'Internal Server Error', | ||
| 69 | + 501: 'Not Implemented', | ||
| 70 | + 502: 'Bad Gateway', | ||
| 71 | + 503: 'Service Unavailable', | ||
| 72 | + 504: 'Gateway Timeout', | ||
| 73 | + 505: 'HTTP Version Not Supported', | ||
| 74 | + 506: 'Variant Also Negotiates', // RFC 2295 | ||
| 75 | + 507: 'Insufficient Storage', // RFC 4918 | ||
| 76 | + 508: 'Loop Detected', | ||
| 77 | + 509: 'Bandwidth Limit Exceeded', | ||
| 78 | + 510: 'Not Extended', // RFC 2774 | ||
| 79 | + 511: 'Network Authentication Required' // RFC 6585 | ||
| 80 | 80 | }; | |
| 81 | 81 | ||
| 82 | 82 | const kOnExecute = HTTPParser.kOnExecute | 0; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -151,19 +151,19 @@ exports.inspect = inspect; | |||
| 151 | 151 | ||
| 152 | 152 | // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics | |
| 153 | 153 | inspect.colors = { | |
| 154 | - 'bold' : [1, 22], | ||
| 155 | - 'italic' : [3, 23], | ||
| 156 | - 'underline' : [4, 24], | ||
| 157 | - 'inverse' : [7, 27], | ||
| 158 | - 'white' : [37, 39], | ||
| 159 | - 'grey' : [90, 39], | ||
| 160 | - 'black' : [30, 39], | ||
| 161 | - 'blue' : [34, 39], | ||
| 162 | - 'cyan' : [36, 39], | ||
| 163 | - 'green' : [32, 39], | ||
| 164 | - 'magenta' : [35, 39], | ||
| 165 | - 'red' : [31, 39], | ||
| 166 | - 'yellow' : [33, 39] | ||
| 154 | + 'bold': [1, 22], | ||
| 155 | + 'italic': [3, 23], | ||
| 156 | + 'underline': [4, 24], | ||
| 157 | + 'inverse': [7, 27], | ||
| 158 | + 'white': [37, 39], | ||
| 159 | + 'grey': [90, 39], | ||
| 160 | + 'black': [30, 39], | ||
| 161 | + 'blue': [34, 39], | ||
| 162 | + 'cyan': [36, 39], | ||
| 163 | + 'green': [32, 39], | ||
| 164 | + 'magenta': [35, 39], | ||
| 165 | + 'red': [31, 39], | ||
| 166 | + 'yellow': [33, 39] | ||
| 167 | 167 | }; | |
| 168 | 168 | ||
| 169 | 169 | // Don't use 'blue' not visible on cmd.exe | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ var testData = [ | |||
| 17 | 17 | 'source': 'foo', | |
| 18 | 18 | 'modules': [ { 'textRaw': 'Sample Markdown', | |
| 19 | 19 | 'name': 'sample_markdown', | |
| 20 | - 'modules': [ { 'textRaw':'Seussian Rhymes', | ||
| 20 | + 'modules': [ { 'textRaw': 'Seussian Rhymes', | ||
| 21 | 21 | 'name': 'seussian_rhymes', | |
| 22 | 22 | 'desc': '<ol>\n<li>fish</li>\n<li><p>fish</p>\n</li>\n<li>' + | |
| 23 | 23 | '<p>Red fish</p>\n</li>\n<li>Blue fish</li>\n</ol>\n', | |
@@ -32,7 +32,7 @@ var testData = [ | |||
| 32 | 32 | { | |
| 33 | 33 | 'file': common.fixturesDir + '/order_of_end_tags_5873.md', | |
| 34 | 34 | 'json': { | |
| 35 | - 'source':'foo', | ||
| 35 | + 'source': 'foo', | ||
| 36 | 36 | 'modules': [ { | |
| 37 | 37 | 'textRaw': 'Title', | |
| 38 | 38 | 'name': 'title', | |
@@ -41,8 +41,8 @@ var testData = [ | |||
| 41 | 41 | 'name': 'subsection', | |
| 42 | 42 | 'classMethods': [ { | |
| 43 | 43 | 'textRaw': 'Class Method: Buffer.from(array)', | |
| 44 | - 'type':'classMethod', | ||
| 45 | - 'name':'from', | ||
| 44 | + 'type': 'classMethod', | ||
| 45 | + 'name': 'from', | ||
| 46 | 46 | 'signatures': [ { | |
| 47 | 47 | 'params': [ { | |
| 48 | 48 | 'textRaw': '`array` {Array} ', | |
@@ -51,7 +51,7 @@ var testData = [ | |||
| 51 | 51 | } ] | |
| 52 | 52 | }, | |
| 53 | 53 | { | |
| 54 | - 'params' : [ { | ||
| 54 | + 'params': [ { | ||
| 55 | 55 | 'name': 'array' | |
| 56 | 56 | } ] | |
| 57 | 57 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,8 +41,8 @@ console.log(custom_inspect); | |||
| 41 | 41 | // test console.dir() | |
| 42 | 42 | console.dir(custom_inspect); | |
| 43 | 43 | console.dir(custom_inspect, { showHidden: false }); | |
| 44 | - console.dir({ foo : { bar : { baz : true } } }, { depth: 0 }); | ||
| 45 | - console.dir({ foo : { bar : { baz : true } } }, { depth: 1 }); | ||
| 44 | + console.dir({ foo: { bar: { baz: true } } }, { depth: 0 }); | ||
| 45 | + console.dir({ foo: { bar: { baz: true } } }, { depth: 1 }); | ||
| 46 | 46 | ||
| 47 | 47 | // test console.trace() | |
| 48 | 48 | console.trace('This is a %j %d', { formatted: 'trace' }, 10, 'foo'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,19 +30,19 @@ var rsaKeyPem = fs.readFileSync(common.fixturesDir + '/test_rsa_privkey.pem', | |||
| 30 | 30 | ||
| 31 | 31 | // PFX tests | |
| 32 | 32 | assert.doesNotThrow(function() { | |
| 33 | - tls.createSecureContext({pfx:certPfx, passphrase:'sample'}); | ||
| 33 | + tls.createSecureContext({pfx: certPfx, passphrase: 'sample'}); | ||
| 34 | 34 | }); | |
| 35 | 35 | ||
| 36 | 36 | assert.throws(function() { | |
| 37 | - tls.createSecureContext({pfx:certPfx}); | ||
| 37 | + tls.createSecureContext({pfx: certPfx}); | ||
| 38 | 38 | }, 'mac verify failure'); | |
| 39 | 39 | ||
| 40 | 40 | assert.throws(function() { | |
| 41 | - tls.createSecureContext({pfx:certPfx, passphrase:'test'}); | ||
| 41 | + tls.createSecureContext({pfx: certPfx, passphrase: 'test'}); | ||
| 42 | 42 | }, 'mac verify failure'); | |
| 43 | 43 | ||
| 44 | 44 | assert.throws(function() { | |
| 45 | - tls.createSecureContext({pfx:'sample', passphrase:'test'}); | ||
| 45 | + tls.createSecureContext({pfx: 'sample', passphrase: 'test'}); | ||
| 46 | 46 | }, 'not enough data'); | |
| 47 | 47 | ||
| 48 | 48 | // Test HMAC | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,19 +32,19 @@ assert.throws(function() { | |||
| 32 | 32 | ||
| 33 | 33 | // PFX tests | |
| 34 | 34 | assert.doesNotThrow(function() { | |
| 35 | - tls.createSecureContext({pfx:certPfx, passphrase:'sample'}); | ||
| 35 | + tls.createSecureContext({pfx: certPfx, passphrase: 'sample'}); | ||
| 36 | 36 | }); | |
| 37 | 37 | ||
| 38 | 38 | assert.throws(function() { | |
| 39 | - tls.createSecureContext({pfx:certPfx}); | ||
| 39 | + tls.createSecureContext({pfx: certPfx}); | ||
| 40 | 40 | }, 'mac verify failure'); | |
| 41 | 41 | ||
| 42 | 42 | assert.throws(function() { | |
| 43 | - tls.createSecureContext({pfx:certPfx, passphrase:'test'}); | ||
| 43 | + tls.createSecureContext({pfx: certPfx, passphrase: 'test'}); | ||
| 44 | 44 | }, 'mac verify failure'); | |
| 45 | 45 | ||
| 46 | 46 | assert.throws(function() { | |
| 47 | - tls.createSecureContext({pfx:'sample', passphrase:'test'}); | ||
| 47 | + tls.createSecureContext({pfx: 'sample', passphrase: 'test'}); | ||
| 48 | 48 | }, 'not enough data'); | |
| 49 | 49 | ||
| 50 | 50 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,7 @@ var server = http.createServer(function(req, res) { | |||
| 20 | 20 | serverCaught++; | |
| 21 | 21 | console.log('horray! got a server error', er); | |
| 22 | 22 | // try to send a 500. If that fails, oh well. | |
| 23 | - res.writeHead(500, {'content-type':'text/plain'}); | ||
| 23 | + res.writeHead(500, {'content-type': 'text/plain'}); | ||
| 24 | 24 | res.end(er.stack || er.message || 'Unknown error'); | |
| 25 | 25 | }); | |
| 26 | 26 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ if (process.argv[2] === 'child') { | |||
| 29 | 29 | var fork = require('child_process').fork; | |
| 30 | 30 | var assert = require('assert'); | |
| 31 | 31 | ||
| 32 | - var child = fork(process.argv[1], ['child'], {silent:true}); | ||
| 32 | + var child = fork(process.argv[1], ['child'], {silent: true}); | ||
| 33 | 33 | var stderrOutput = ''; | |
| 34 | 34 | if (child) { | |
| 35 | 35 | child.stderr.on('data', function onStderrData(data) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ if (process.argv[2] === 'request') { | |||
| 11 | 11 | const http = require('http'); | |
| 12 | 12 | const options = { | |
| 13 | 13 | port: common.PORT, | |
| 14 | - path : '/' | ||
| 14 | + path: '/' | ||
| 15 | 15 | }; | |
| 16 | 16 | ||
| 17 | 17 | http.get(options, (res) => { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments