JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 395065
  • Score
    100M100P100Q193446F

An module for serializing and deserializing JSON data in to hstore format

Package Exports

  • pg-hstore

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pg-hstore) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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