MCPcopy Index your code
hub / github.com/nodejs/node / readUInt16LE

Function readUInt16LE

lib/internal/buffer.js:244–252  ·  view source on GitHub ↗
(buf, offset = 0)

Source from the content-addressed store, hash-verified

242}
243
244function readUInt16LE(buf, offset = 0) {
245 validateNumber(offset, 'offset');
246 const first = buf[offset];
247 const last = buf[offset + 1];
248 if (first === undefined || last === undefined)
249 boundsError(offset, buf.length - 2);
250
251 return first + last * 2 ** 8;
252}
253
254function readUInt8(buf, offset = 0) {
255 validateNumber(offset, 'offset');

Callers 2

readUIntLEFunction · 0.85

Calls 1

boundsErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…