Socket
Socket
Sign inDemoInstall

pg-types

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-types - npm Package Compare versions

Comparing version 1.12.0 to 1.12.1

14

lib/textParsers.js
var array = require('postgres-array')
var ap = require('ap')
var arrayParser = require('./arrayParser');

@@ -31,5 +30,9 @@ var parseDate = require('postgres-date');

function parseBaseTenInt (string) {
return parseInt(string, 10)
}
function parseIntegerArray (value) {
if (!value) return null
return array.parse(value, allowNull(ap.partialRight(parseInt, 10)))
return array.parse(value, allowNull(parseBaseTenInt))
}

@@ -89,8 +92,5 @@

var parseByteAArray = function(value) {
var arr = parseStringArray(value);
if (!arr) return arr;
if (!value) { return null; }
return arr.map(function(element) {
return parseByteA(element);
});
return array.parse(value, allowNull(parseByteA));
};

@@ -97,0 +97,0 @@

{
"name": "pg-types",
"version": "1.12.0",
"version": "1.12.1",
"description": "Query result type converters for node-postgres",

@@ -30,3 +30,2 @@ "main": "index.js",

"dependencies": {
"ap": "~0.2.0",
"postgres-array": "~1.0.0",

@@ -33,0 +32,0 @@ "postgres-bytea": "~1.0.0",

@@ -276,3 +276,10 @@ 'use strict'

t.ok(buffer.equals(value[0]))
}]
}],
['{NULL,"\\\\x4e554c4c"}', function (t, value) {
var buffer = new Buffer('4e554c4c', 'hex')
t.ok(Array.isArray(value))
t.equal(value.length, 2)
t.equal(value[0], null)
t.ok(buffer.equals(value[1]))
}],
]

@@ -279,0 +286,0 @@ }

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