Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

pg-numeric

charmander7.9mISC1.0.2

reads PostgreSQL binary format for numeric values into a string

readme

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'

changelog

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.