mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
lib: add trailing commas to all public core modules
PR-URL: https://github.com/nodejs/node/pull/46848 Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
This commit is contained in:
26
lib/zlib.js
26
lib/zlib.js
@@ -55,7 +55,7 @@ const {
|
||||
} = require('internal/errors');
|
||||
const { Transform, finished } = require('stream');
|
||||
const {
|
||||
deprecate
|
||||
deprecate,
|
||||
} = require('internal/util');
|
||||
const {
|
||||
isArrayBufferView,
|
||||
@@ -66,7 +66,7 @@ const binding = internalBinding('zlib');
|
||||
const assert = require('internal/assert');
|
||||
const {
|
||||
Buffer,
|
||||
kMaxLength
|
||||
kMaxLength,
|
||||
} = require('buffer');
|
||||
const { owner_symbol } = require('internal/async_hooks').symbols;
|
||||
const {
|
||||
@@ -103,7 +103,7 @@ const codes = {
|
||||
Z_DATA_ERROR: constants.Z_DATA_ERROR,
|
||||
Z_MEM_ERROR: constants.Z_MEM_ERROR,
|
||||
Z_BUF_ERROR: constants.Z_BUF_ERROR,
|
||||
Z_VERSION_ERROR: constants.Z_VERSION_ERROR
|
||||
Z_VERSION_ERROR: constants.Z_VERSION_ERROR,
|
||||
};
|
||||
|
||||
for (const ckey of ObjectKeys(codes)) {
|
||||
@@ -313,7 +313,7 @@ ObjectDefineProperty(ZlibBase.prototype, '_closed', {
|
||||
enumerable: true,
|
||||
get() {
|
||||
return !this._handle;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// `bytesRead` made sense as a name when looking from the zlib engine's
|
||||
@@ -331,7 +331,7 @@ ObjectDefineProperty(ZlibBase.prototype, 'bytesRead', {
|
||||
set: deprecate(function(value) {
|
||||
this.bytesWritten = value;
|
||||
}, 'Setting zlib.bytesRead is deprecated. ' +
|
||||
'This feature will be removed in the future.', 'DEP0108')
|
||||
'This feature will be removed in the future.', 'DEP0108'),
|
||||
});
|
||||
|
||||
ZlibBase.prototype.reset = function() {
|
||||
@@ -625,7 +625,7 @@ function _close(engine) {
|
||||
const zlibDefaultOpts = {
|
||||
flush: Z_NO_FLUSH,
|
||||
finishFlush: Z_FINISH,
|
||||
fullFlush: Z_FULL_FLUSH
|
||||
fullFlush: Z_FULL_FLUSH,
|
||||
};
|
||||
// Base class for all streams actually backed by zlib and using zlib-specific
|
||||
// parameters.
|
||||
@@ -813,7 +813,7 @@ const brotliInitParamsArray = new Uint32Array(kMaxBrotliParam + 1);
|
||||
const brotliDefaultOpts = {
|
||||
flush: BROTLI_OPERATION_PROCESS,
|
||||
finishFlush: BROTLI_OPERATION_FINISH,
|
||||
fullFlush: BROTLI_OPERATION_FLUSH
|
||||
fullFlush: BROTLI_OPERATION_FLUSH,
|
||||
};
|
||||
function Brotli(opts, mode) {
|
||||
assert(mode === BROTLI_DECODE || mode === BROTLI_ENCODE);
|
||||
@@ -878,7 +878,7 @@ function createProperty(ctor) {
|
||||
enumerable: true,
|
||||
value: function(options) {
|
||||
return new ctor(options);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ function createProperty(ctor) {
|
||||
ObjectDefineProperty(binding.Zlib.prototype, 'jsref', {
|
||||
__proto__: null,
|
||||
get() { return this[owner_symbol]; },
|
||||
set(v) { return this[owner_symbol] = v; }
|
||||
set(v) { return this[owner_symbol] = v; },
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
@@ -937,14 +937,14 @@ ObjectDefineProperties(module.exports, {
|
||||
__proto__: null,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
value: constants
|
||||
value: constants,
|
||||
},
|
||||
codes: {
|
||||
__proto__: null,
|
||||
enumerable: true,
|
||||
writable: false,
|
||||
value: ObjectFreeze(codes)
|
||||
}
|
||||
value: ObjectFreeze(codes),
|
||||
},
|
||||
});
|
||||
|
||||
// These should be considered deprecated
|
||||
@@ -953,6 +953,6 @@ for (const bkey of ObjectKeys(constants)) {
|
||||
if (StringPrototypeStartsWith(bkey, 'BROTLI')) continue;
|
||||
ObjectDefineProperty(module.exports, bkey, {
|
||||
__proto__: null,
|
||||
enumerable: false, value: constants[bkey], writable: false
|
||||
enumerable: false, value: constants[bkey], writable: false,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user