Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 03c61a7

Browse filesBrowse files
committed
buffer: also alias BigUInt methods
These were overlooked in 5864fca because of the extra `Big` in the name. :) Refs: nodejs#34729
1 parent 8ec3b55 commit 03c61a7
Copy full SHA for 03c61a7

File tree

Expand file treeCollapse file tree

3 files changed

+22
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+22
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/buffer.md‎

Copy file name to clipboardExpand all lines: doc/api/buffer.md
+16Lines changed: 16 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,10 @@ values.
13791379
added:
13801380
- v12.0.0
13811381
- v10.20.0
1382+
changes:
1383+
- version: REPLACEME
1384+
pr-url: https://github.com/nodejs/node/pull/?????
1385+
description: This function is also available as `buf.readBigUint64BE()`.
13821386
-->
13831387

13841388
* `offset` {integer} Number of bytes to skip before starting to read. Must
@@ -1400,6 +1404,10 @@ console.log(buf.readBigUInt64BE(0));
14001404
added:
14011405
- v12.0.0
14021406
- v10.20.0
1407+
changes:
1408+
- version: REPLACEME
1409+
pr-url: https://github.com/nodejs/node/pull/?????
1410+
description: This function is also available as `buf.readBigUint64LE()`.
14031411
-->
14041412

14051413
* `offset` {integer} Number of bytes to skip before starting to read. Must
@@ -2304,6 +2312,10 @@ console.log(buf);
23042312
added:
23052313
- v12.0.0
23062314
- v10.20.0
2315+
changes:
2316+
- version: REPLACEME
2317+
pr-url: https://github.com/nodejs/node/pull/?????
2318+
description: This function is also available as `buf.writeBigUint64BE()`.
23072319
-->
23082320

23092321
* `value` {bigint} Number to be written to `buf`.
@@ -2327,6 +2339,10 @@ console.log(buf);
23272339
added:
23282340
- v12.0.0
23292341
- v10.20.0
2342+
changes:
2343+
- version: REPLACEME
2344+
pr-url: https://github.com/nodejs/node/pull/?????
2345+
description: This function is also available as `buf.writeBigUint64LE()`.
23302346
-->
23312347

23322348
* `value` {bigint} Number to be written to `buf`.
Collapse file

‎lib/internal/buffer.js‎

Copy file name to clipboardExpand all lines: lib/internal/buffer.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,10 +952,14 @@ class FastBuffer extends Uint8Array {}
952952
function addBufferPrototypeMethods(proto) {
953953
proto.readBigUInt64LE = readBigUInt64LE,
954954
proto.readBigUInt64BE = readBigUInt64BE,
955+
proto.readBigUint64LE = readBigUInt64LE,
956+
proto.readBigUint64BE = readBigUInt64BE,
955957
proto.readBigInt64LE = readBigInt64LE,
956958
proto.readBigInt64BE = readBigInt64BE,
957959
proto.writeBigUInt64LE = writeBigUInt64LE,
958960
proto.writeBigUInt64BE = writeBigUInt64BE,
961+
proto.writeBigUint64LE = writeBigUInt64LE,
962+
proto.writeBigUint64BE = writeBigUInt64BE,
959963
proto.writeBigInt64LE = writeBigInt64LE,
960964
proto.writeBigInt64BE = writeBigInt64BE,
961965

Collapse file

‎test/parallel/test-buffer-writeuint.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-writeuint.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ const assert = require('assert');
222222
}
223223

224224
for (const fn of [
225-
'UInt8', 'UInt16LE', 'UInt16BE', 'UInt32LE', 'UInt32BE', 'UIntLE', 'UIntBE'
225+
'UInt8', 'UInt16LE', 'UInt16BE', 'UInt32LE', 'UInt32BE', 'UIntLE', 'UIntBE',
226+
'BigUInt64LE', 'BigUInt64BE',
226227
]) {
227228
const p = Buffer.prototype;
228229
const lowerFn = fn.replace(/UInt/, 'Uint');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.