Socket
Book a DemoInstallSign in
Socket

pg-parse-float

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-parse-float

restore parseFloat behavior to node-postgres (pg) - can be used as a reference for implementing other type parsing addons

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
2.2K
23.62%
Maintainers
1
Weekly downloads
 
Created
Source

pg-parse-float

Restore 'parseFloat' functionailty to node-postgres. Allowing it to return float column types as JavaScript floats.

install

npm install pg-parse-float

use

var pg = require('pg');
require('pg-parse-float')(pg);

//now all your floats (float4, float8, numeric) will come back out
//as floats in JavaScript

notes

This can be used as an example of how to extend or override the built in type parsers for other types as well.

There were some discussions around this:

  • https://github.com/brianc/node-postgres/pull/301
  • https://github.com/brianc/node-postgres/pull/271

license

MIT

Keywords

postgres

FAQs

Package last updated on 11 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts