mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
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:
parent
3acdeb1f7a
commit
fe514bf960
109 changed files with 389 additions and 389 deletions
|
@ -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'],
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue