summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/_tls_legacy.js2
-rw-r--r--lib/_tls_wrap.js2
-rw-r--r--lib/async_hooks.js7
-rw-r--r--lib/buffer.js2
-rw-r--r--lib/child_process.js8
-rw-r--r--lib/crypto.js2
-rw-r--r--lib/fs.js31
-rw-r--r--lib/inspector.js6
-rw-r--r--lib/internal/bootstrap_node.js2
-rw-r--r--lib/internal/child_process.js8
-rw-r--r--lib/internal/readline.js7
-rw-r--r--lib/readline.js8
-rw-r--r--lib/timers.js2
-rw-r--r--lib/tls.js2
-rw-r--r--lib/url.js7
-rw-r--r--lib/util.js4
16 files changed, 51 insertions, 49 deletions
diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js
index c00e15a1b7..39138a15fc 100644
--- a/lib/_tls_legacy.js
+++ b/lib/_tls_legacy.js
@@ -384,7 +384,7 @@ Object.defineProperty(CryptoStream.prototype, 'bytesWritten', {
CryptoStream.prototype.getPeerCertificate = function(detailed) {
if (this.pair.ssl) {
return common.translatePeerCertificate(
- this.pair.ssl.getPeerCertificate(detailed));
+ this.pair.ssl.getPeerCertificate(detailed));
}
return null;
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index 87b060f57a..8215d92c8b 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -659,7 +659,7 @@ TLSSocket.prototype.setSession = function(session) {
TLSSocket.prototype.getPeerCertificate = function(detailed) {
if (this._handle) {
return common.translatePeerCertificate(
- this._handle.getPeerCertificate(detailed));
+ this._handle.getPeerCertificate(detailed));
}
return null;
diff --git a/lib/async_hooks.js b/lib/async_hooks.js
index ebbd284c00..a730738c0f 100644
--- a/lib/async_hooks.js
+++ b/lib/async_hooks.js
@@ -71,8 +71,7 @@ function fatalError(e) {
Error.captureStackTrace(o, fatalError);
process._rawDebug(o.stack);
}
- if (process.execArgv.some(
- (e) => /^--abort[_-]on[_-]uncaught[_-]exception$/.test(e))) {
+ if (process.execArgv.some((e) => /^--abort[_-]on[_-]uncaught[_-]exception$/.test(e))) {
process.abort();
}
process.exit(1);
@@ -434,8 +433,8 @@ function init(asyncId, type, triggerAsyncId, resource) {
for (var i = 0; i < active_hooks_array.length; i++) {
if (typeof active_hooks_array[i][init_symbol] === 'function') {
active_hooks_array[i][init_symbol](
- asyncId, type, triggerAsyncId,
- resource
+ asyncId, type, triggerAsyncId,
+ resource
);
}
}
diff --git a/lib/buffer.js b/lib/buffer.js
index 89bbfd2474..cfe3080810 100644
--- a/lib/buffer.js
+++ b/lib/buffer.js
@@ -763,7 +763,7 @@ function slowIndexOf(buffer, val, byteOffset, encoding, dir) {
case 'ascii':
case 'hex':
return binding.indexOfBuffer(
- buffer, Buffer.from(val, encoding), byteOffset, encoding, dir);
+ buffer, Buffer.from(val, encoding), byteOffset, encoding, dir);
default:
if (loweredCase) {
diff --git a/lib/child_process.js b/lib/child_process.js
index 8f7d252062..a2a576e946 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -87,7 +87,7 @@ exports.fork = function(modulePath /*, args, options*/) {
// Use a separate fd=3 for the IPC channel. Inherit stdin, stdout,
// and stderr from the parent if silent isn't set.
options.stdio = options.silent ? stdioStringToArray('pipe') :
- stdioStringToArray('inherit');
+ stdioStringToArray('inherit');
} else if (options.stdio.indexOf('ipc') === -1) {
throw new TypeError('Forked processes must have an IPC channel');
}
@@ -539,9 +539,9 @@ function spawnSync(/*file, args, options*/) {
pipe.input = Buffer.from(input, options.encoding);
} else {
throw new TypeError(util.format(
- 'stdio[%d] should be Buffer, Uint8Array or string not %s',
- i,
- typeof input));
+ 'stdio[%d] should be Buffer, Uint8Array or string not %s',
+ i,
+ typeof input));
}
}
}
diff --git a/lib/crypto.js b/lib/crypto.js
index 8893aa7425..56795e23f2 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -633,7 +633,7 @@ function pbkdf2(password, salt, iterations, keylen, digest, callback) {
if (digest === undefined) {
throw new TypeError(
- 'The "digest" argument is required and must not be undefined');
+ 'The "digest" argument is required and must not be undefined');
}
password = toBuf(password);
diff --git a/lib/fs.js b/lib/fs.js
index 5bbd9f4946..91489f8166 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -172,20 +172,21 @@ function isFd(path) {
// Constructor for file stats.
function Stats(
- dev,
- mode,
- nlink,
- uid,
- gid,
- rdev,
- blksize,
- ino,
- size,
- blocks,
- atim_msec,
- mtim_msec,
- ctim_msec,
- birthtim_msec) {
+ dev,
+ mode,
+ nlink,
+ uid,
+ gid,
+ rdev,
+ blksize,
+ ino,
+ size,
+ blocks,
+ atim_msec,
+ mtim_msec,
+ ctim_msec,
+ birthtim_msec
+) {
this.dev = dev;
this.mode = mode;
this.nlink = nlink;
@@ -1285,7 +1286,7 @@ fs.writeFile = function(path, data, options, callback) {
function writeFd(fd, isUserFd) {
var buffer = isUint8Array(data) ?
- data : Buffer.from('' + data, options.encoding || 'utf8');
+ data : Buffer.from('' + data, options.encoding || 'utf8');
var position = /a/.test(flag) ? null : 0;
writeAll(fd, isUserFd, buffer, 0, buffer.length, position, callback);
diff --git a/lib/inspector.js b/lib/inspector.js
index d73d8a2349..6a80c36d52 100644
--- a/lib/inspector.js
+++ b/lib/inspector.js
@@ -43,7 +43,7 @@ class Session extends EventEmitter {
post(method, params, callback) {
if (typeof method !== 'string') {
throw new TypeError(
- `"method" must be a string, got ${typeof method} instead`);
+ `"method" must be a string, got ${typeof method} instead`);
}
if (!callback && util.isFunction(params)) {
callback = params;
@@ -51,11 +51,11 @@ class Session extends EventEmitter {
}
if (params && typeof params !== 'object') {
throw new TypeError(
- `"params" must be an object, got ${typeof params} instead`);
+ `"params" must be an object, got ${typeof params} instead`);
}
if (callback && typeof callback !== 'function') {
throw new TypeError(
- `"callback" must be a function, got ${typeof callback} instead`);
+ `"callback" must be a function, got ${typeof callback} instead`);
}
if (!this[connectionSymbol]) {
diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js
index efc66b1b23..0c82e5e36d 100644
--- a/lib/internal/bootstrap_node.js
+++ b/lib/internal/bootstrap_node.js
@@ -348,7 +348,7 @@
if (async_hook_fields[kAfter] > 0) {
do {
NativeModule.require('async_hooks').emitAfter(
- async_uid_fields[kCurrentAsyncId]);
+ async_uid_fields[kCurrentAsyncId]);
// popAsyncIds() returns true if there are more ids on the stack.
} while (popAsyncIds(async_uid_fields[kCurrentAsyncId]));
// Or completely empty the id stack.
diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js
index b0731ab7c2..216a2fb85a 100644
--- a/lib/internal/child_process.js
+++ b/lib/internal/child_process.js
@@ -347,7 +347,7 @@ ChildProcess.prototype.spawn = function(options) {
// when i === 0 - we're dealing with stdin
// (which is the only one writable pipe)
stream.socket = createSocket(this.pid !== 0 ?
- stream.handle : null, i > 0);
+ stream.handle : null, i > 0);
if (i > 0 && this.pid !== 0) {
this._closesNeeded++;
@@ -359,11 +359,11 @@ ChildProcess.prototype.spawn = function(options) {
}
this.stdin = stdio.length >= 1 && stdio[0].socket !== undefined ?
- stdio[0].socket : null;
+ stdio[0].socket : null;
this.stdout = stdio.length >= 2 && stdio[1].socket !== undefined ?
- stdio[1].socket : null;
+ stdio[1].socket : null;
this.stderr = stdio.length >= 3 && stdio[2].socket !== undefined ?
- stdio[2].socket : null;
+ stdio[2].socket : null;
this.stdio = [];
diff --git a/lib/internal/readline.js b/lib/internal/readline.js
index 96da5cc82f..b15ed4972e 100644
--- a/lib/internal/readline.js
+++ b/lib/internal/readline.js
@@ -84,7 +84,8 @@ if (process.binding('config').hasIntl) {
// Code points are derived from:
// http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt
- if (code >= 0x1100 && (
+ if (
+ code >= 0x1100 && (
code <= 0x115f || // Hangul Jamo
0x2329 === code || // LEFT-POINTING ANGLE BRACKET
0x232a === code || // RIGHT-POINTING ANGLE BRACKET
@@ -112,7 +113,9 @@ if (process.binding('config').hasIntl) {
// Enclosed Ideographic Supplement
0x1f200 <= code && code <= 0x1f251 ||
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
- 0x20000 <= code && code <= 0x3fffd)) {
+ 0x20000 <= code && code <= 0x3fffd
+ )
+ ) {
return true;
}
diff --git a/lib/readline.js b/lib/readline.js
index 00bbae758c..b38909a8e7 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -736,12 +736,12 @@ Interface.prototype._moveCursor = function(dx) {
var diffWidth;
if (diffCursor < 0) {
diffWidth = -getStringWidth(
- this.line.substring(this.cursor, oldcursor)
- );
+ this.line.substring(this.cursor, oldcursor)
+ );
} else if (diffCursor > 0) {
diffWidth = getStringWidth(
- this.line.substring(this.cursor, oldcursor)
- );
+ this.line.substring(this.cursor, oldcursor)
+ );
}
moveCursor(this.output, diffWidth, 0);
this.prevRows = newPos.rows;
diff --git a/lib/timers.js b/lib/timers.js
index caa31459fb..38d83f8c17 100644
--- a/lib/timers.js
+++ b/lib/timers.js
@@ -296,7 +296,7 @@ function listOnTimeout() {
function tryOnTimeout(timer, list) {
timer._called = true;
const timerAsyncId = (typeof timer[async_id_symbol] === 'number') ?
- timer[async_id_symbol] : null;
+ timer[async_id_symbol] : null;
var threw = true;
if (timerAsyncId !== null)
emitBefore(timerAsyncId, timer[trigger_id_symbol]);
diff --git a/lib/tls.js b/lib/tls.js
index 5a03c3c30f..d89f241383 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -220,7 +220,7 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) {
if (!valid) {
const err = new Error(
- `Hostname/IP doesn't match certificate's altnames: "${reason}"`);
+ `Hostname/IP doesn't match certificate's altnames: "${reason}"`);
err.reason = reason;
err.host = host;
err.cert = cert;
diff --git a/lib/url.js b/lib/url.js
index 70584f8d07..3af9e8f7bf 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -760,8 +760,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/');
var isRelAbs = (
- relative.host ||
- relative.pathname && relative.pathname.charAt(0) === '/'
+ relative.host || relative.pathname && relative.pathname.charAt(0) === '/'
);
var mustEndAbs = (isRelAbs || isSourceAbs ||
(result.host && relative.pathname));
@@ -865,8 +864,8 @@ Url.prototype.resolveObject = function resolveObject(relative) {
// then it must NOT get a trailing slash.
var last = srcPath.slice(-1)[0];
var hasTrailingSlash = (
- (result.host || relative.host || srcPath.length > 1) &&
- (last === '.' || last === '..') || last === '');
+ (result.host || relative.host || srcPath.length > 1) &&
+ (last === '.' || last === '..') || last === '');
// strip single dots, resolve double dots to parent dir
// if the path tries to go above the root, `up` ends up > 0
diff --git a/lib/util.js b/lib/util.js
index fdc4a9b3b6..fea6471de6 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -400,7 +400,7 @@ function formatValue(ctx, value, recurseTimes) {
if (typeof value === 'function') {
const ctorName = constructor ? constructor.name : 'Function';
return ctx.stylize(
- `[${ctorName}${value.name ? `: ${value.name}` : ''}]`, 'special');
+ `[${ctorName}${value.name ? `: ${value.name}` : ''}]`, 'special');
}
if (isRegExp(value)) {
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
@@ -695,7 +695,7 @@ function formatTypedArray(ctx, value, recurseTimes, visibleKeys, keys) {
for (const key of keys) {
if (typeof key === 'symbol' || !numbersOnlyRE.test(key)) {
output.push(
- formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
+ formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
}
}
return output;