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

pg-hstore

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-hstore - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

4

lib/index.js

@@ -60,6 +60,8 @@ (function () {

for (i = 0, l = matches.length; i < l; i+= 2) {
if(matches) {
for (i = 0, l = matches.length; i < l; i+= 2) {
var key = clean(matches[i]);
var value = matches[i + 1];
result[key] = value=="NULL"?null:clean(value);
}
}

@@ -66,0 +68,0 @@ if (!callback || callback === null) return result;

@@ -7,3 +7,3 @@ {

"keywords": ["pg", "postgres", "hstore"],
"version": "2.1.1",
"version": "2.1.2",
"main": "lib/index.js",

@@ -10,0 +10,0 @@ "homepage": "https://github.com/scarney81/pg-hstore",

@@ -18,3 +18,3 @@ [![Build Status](https://travis-ci.org/scarney81/pg-hstore.png)](https://travis-ci.org/[YOUR_GITHUB_USERNAME]/[YOUR_PROJECT_NAME])

```javascript
var hstore = require('pg-hstore');
var hstore = require('pg-hstore')();
var source = { foo: "oof", bar: "rab", baz: "zab" };

@@ -31,3 +31,3 @@ hstore.stringify(source, function(result) {

```javascript
var hstore = require('pg-hstore');
var hstore = require('pg-hstore')();
var source = '"foo"=>"oof", "bar"=>"rab", "baz"=>"zab"';

@@ -34,0 +34,0 @@ hstore.parse(source, function(result) {

@@ -24,2 +24,11 @@ /*globals it, describe, beforeEach */

it('should hstore parse an empty hstore string', function (done) {
var source = '';
hstore.parse(source, function (target) {
should.exist(target);
target.should.eql({});
done();
});
});
it('should hstore parse an hstore string with multiple values', function (done) {

@@ -26,0 +35,0 @@ var source = '"foo"=>"oof","bar"=>"rab","baz"=>"zab"';

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