Initial commit

This commit is contained in:
Ammaar Reshi
2025-01-04 14:06:53 +00:00
parent 7082408604
commit d6025af146
23760 changed files with 3299690 additions and 0 deletions

19
node_modules/postgres-bytea/decode-test.js generated vendored Normal file
View File

@ -0,0 +1,19 @@
'use strict'
const test = require('tape')
const decode = require('./')
test('decode', (t) => {
t.test('pg <9 escape format', (t) => {
const buffer = Buffer.from([102, 111, 111, 0, 128, 92, 255])
t.ok(buffer.equals(decode('foo\\000\\200\\\\\\377')))
t.end()
})
t.test('pg >=9 hex format', (t) => {
t.ok(decode('\\x1234').equals(Buffer.from([0x12, 0x34])))
t.end()
})
t.end()
})