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

Method addString

packages/pg-protocol/src/testing/buffer-list.ts:34–39  ·  view source on GitHub ↗
(val: string, front?: boolean)

Source from the content-addressed store, hash-verified

32 }
33
34 public addString(val: string, front?: boolean) {
35 const len = Buffer.byteLength(val)
36 const buffer = Buffer.alloc(len)
37 buffer.write(val)
38 return this.add(buffer, front)
39 }
40
41 public addChar(char: string, first?: boolean) {
42 return this.add(Buffer.from(char, 'utf8'), first)

Callers 1

test-buffers.tsFile · 0.45

Calls 2

addMethod · 0.95
writeMethod · 0.80

Tested by

no test coverage detected