包详细信息

pg-numeric

charmander16mISC1.0.2

reads PostgreSQL binary format for numeric values into a string

自述文件

A reader for the PostgreSQL binary format for numeric values, producing a string. Designed for pg.

const readNumeric = require('pg-numeric');

readNumeric(Buffer.from('000600020000000a000c0d801ed203db198f0834', 'hex'))
// '1234567890.0987654321'

更新日志

Unreleased

1.0.2 – 2019-11-10

Fixed

  • A negative sign is no longer stripped by mistake for numbers of the form −0.000…00(d) where the number of zeros after the decimal point is 2 mod 4.