| Server IP : 138.197.176.125 / Your IP : 216.73.216.41 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/dev.wowchat.co_01012026/node_modules/postgres-bytea/ |
Upload File : |
'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()
})