$ npm install pg-hstore
A node package for serializing and deserializing JSON data to hstore format
$ npm install pg-hstore
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"'
...
});
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" }
...
});
© 2010 - cnpmjs.org x YWFE | Home | YWFE