Small utility to restore JavaScript parseFloat behavior to node-postgres (pg), converting float4, float8, and numeric columns to JavaScript floats. Version 0.0.1 is stable, with no active development. It serves as a reference for building custom type parsers. Differentiates itself as a minimal, dependency-free patch for node-postgres users who want floats instead of strings for numeric types.
npm install pg-parse-floatNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require and invoke pg-parse-float to patch node-postgres, then query a float column and receive a JavaScript number.
Ensure pg is required once and pgParseFloat(pg) is called before creating any clients.
Do not use this library if you need exact numeric representation; use a library like pg-types or handle parsing manually.
Consider using native node-postgres type parsers or write your own conversion using pg-types.
Ensure you require pg-parse-float and pass the pg reference correctly: const pg = require('pg'); require('pg-parse-float')(pg);No dependency data recorded yet.