Files
Gemini-Search/node_modules/postgres-bytea/encoder.js
Ammaar Reshi d6025af146 Initial commit
2025-01-04 14:06:53 +00:00

18 lines
285 B
JavaScript

'use strict'
const { Transform } = require('stream')
class ByteaEncoder extends Transform {
constructor () {
super()
this.push('\\\\x')
}
_transform (chunk, encoding, callback) {
this.push(chunk.toString('hex'))
callback()
}
}
module.exports = ByteaEncoder