chitfund/backend/node_modules/pg-hstore
Deep Koluguri afb40fdc87 Initial commit 2025-11-05 00:37:09 -05:00
..
lib Initial commit 2025-11-05 00:37:09 -05:00
test Initial commit 2025-11-05 00:37:09 -05:00
.jshintrc Initial commit 2025-11-05 00:37:09 -05:00
.travis.yml Initial commit 2025-11-05 00:37:09 -05:00
LICENSE Initial commit 2025-11-05 00:37:09 -05:00
README.md Initial commit 2025-11-05 00:37:09 -05:00
package.json Initial commit 2025-11-05 00:37:09 -05:00

README.md

Build Status

pg-hstore

A node package for serializing and deserializing JSON data to hstore format

Install pg-hstore

$ npm install pg-hstore

Usage

stringify

var hstore = require('pg-hstore')();
var source = { foo: "oof", bar: "rab", baz: "zab" };
hstore.stringify(source, function(result) {
  ...
  // result = '"foo"=>"oof", "bar"=>"rab", "baz"=>"zab"'
  ...
});

parse

var hstore = require('pg-hstore')();
var source = '"foo"=>"oof", "bar"=>"rab", "baz"=>"zab"';
hstore.parse(source, function(result) {
  ...
  // result = { foo: "oof", bar: "rab", baz: "zab" } 
  ...
});