pg-hstore

2.3.4 • Public • Published

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" } 
  ...
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.3.4
    286,517
    • latest

Version History

Package Sidebar

Install

npm i pg-hstore

Weekly Downloads

328,363

Version

2.3.4

License

MIT

Unpacked Size

22 kB

Total Files

10

Last publish

Collaborators

  • scarney