pg-hstore中文文档|pg-hstore js中文教程|解析
安装命令:npm i pg-hstore
pg-hstore
用于将 JSON 数据序列化和反序列化为 hstore 格式的节点包
安装 pg-hstore
$ 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" }
...
});
项目issue数量: 2
项目贡献人员列表: