lib: enforce use of trailing commas for functions

PR-URL: https://github.com/nodejs/node/pull/46629
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
Antoine du Hamel 2023-02-14 18:45:16 +01:00 committed by GitHub
parent 3acdeb1f7a
commit fe514bf960
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 389 additions and 389 deletions

View file

@ -326,7 +326,7 @@ Buffer.from = function from(value, encodingOrOffset, length) {
throw new ERR_INVALID_ARG_TYPE(
'first argument',
['string', 'Buffer', 'ArrayBuffer', 'Array', 'Array-like Object'],
value
value,
);
};
@ -733,7 +733,7 @@ function byteLength(string, encoding) {
}
throw new ERR_INVALID_ARG_TYPE(
'string', ['string', 'Buffer', 'ArrayBuffer'], string
'string', ['string', 'Buffer', 'ArrayBuffer'], string,
);
}
@ -954,7 +954,7 @@ function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
}
throw new ERR_INVALID_ARG_TYPE(
'value', ['number', 'string', 'Buffer', 'Uint8Array'], val
'value', ['number', 'string', 'Buffer', 'Uint8Array'], val,
);
}
@ -1210,7 +1210,7 @@ if (internalBinding('config').hasIntl) {
const code = icuErrName(result);
const err = genericNodeError(
`Unable to transcode Buffer [${code}]`,
{ code: code, errno: result }
{ code: code, errno: result },
);
throw err;
};
@ -1362,10 +1362,10 @@ ObjectDefineProperties(module.exports, {
defineLazyProperties(
module.exports,
'internal/blob',
['Blob', 'resolveObjectURL']
['Blob', 'resolveObjectURL'],
);
defineLazyProperties(
module.exports,
'internal/file',
['File']
['File'],
);