MCPcopy Index your code
hub / github.com/brianc/node-postgres / join

Method join

packages/pg-protocol/src/testing/buffer-list.ts:49–66  ·  view source on GitHub ↗
(appendLength?: boolean, char?: string)

Source from the content-addressed store, hash-verified

47 }
48
49 public join(appendLength?: boolean, char?: string): Buffer {
50 let length = this.getByteLength()
51 if (appendLength) {
52 this.addInt32(length + 4, true)
53 return this.join(false, char)
54 }
55 if (char) {
56 this.addChar(char, true)
57 length++
58 }
59 const result = Buffer.alloc(length)
60 let index = 0
61 this.buffers.forEach(function (buffer) {
62 buffer.copy(result, index, 0)
63 index += buffer.length
64 })
65 return result
66 }
67}

Callers 1

test-buffers.tsFile · 0.45

Calls 3

getByteLengthMethod · 0.95
addInt32Method · 0.95
addCharMethod · 0.95

Tested by

no test coverage detected