Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pg

Package Overview
Dependencies
Maintainers
1
Versions
225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

18

lib/writer.js

@@ -6,3 +6,3 @@ //binary data writer tuned for creating

this.size = size || 1024;
this.buffer = new Buffer(this.size + 5);
this.buffer = Buffer(this.size + 5);
this.offset = 5;

@@ -40,2 +40,14 @@ this.headerPosition = 0;

//for versions of node requiring 'length' as 3rd argument to buffer.write
var writeString = function(buffer, string, offset, len) {
buffer.write(string, offset, len);
}
//overwrite function for older versions of node
if(Buffer.prototype.write.length === 3) {
writeString = function(buffer, string, offset, len) {
buffer.write(string, offset);
}
}
p.addCString = function(string) {

@@ -48,3 +60,3 @@ //just write a 0 for empty or null strings

this._ensure(len + 1); //+1 for null terminator
this.buffer.write(string, this.offset, len);
writeString(this.buffer, string, this.offset, len);
this.offset += len;

@@ -59,3 +71,3 @@ }

this._ensure(1);
this.buffer.write(char, this.offset, 1);
writeString(this.buffer, char, this.offset, 1);
this.offset++;

@@ -62,0 +74,0 @@ return this;

2

package.json
{ "name": "pg",
"version": "0.6.4",
"version": "0.6.5",
"description": "PostgreSQL client - pure javascript & libpq with the same API",

@@ -4,0 +4,0 @@ "keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc