MCPcopy
hub / github.com/mongodb/node-mongodb-native / readInt32LE

Function readInt32LE

src/bson.ts:53–56  ·  view source on GitHub ↗
(buffer: Uint8Array, offset: number)

Source from the content-addressed store, hash-verified

51// readInt32LE, reads a 32-bit integer from buffer at given offset
52// throws if offset is out of bounds
53export const readInt32LE = (buffer: Uint8Array, offset: number): number => {
54 validateBufferInputs(buffer, offset, 4);
55 return NumberUtils.getInt32LE(buffer, offset);
56};
57
58// readUint8, reads a single unsigned byte from buffer at given offset
59export const readUint8 = (buffer: Uint8Array, offset: number): number => {

Callers 7

commands.test.tsFile · 0.90
commands.test.tsFile · 0.90
parseMethod · 0.90
constructorMethod · 0.90
parseMethod · 0.90
toBinMethod · 0.90
decompressResponseFunction · 0.90

Calls 1

validateBufferInputsFunction · 0.85

Tested by

no test coverage detected