# pg-hstore

> A module for serializing and deserializing JSON data into hstore format

Latest version **2.3.4** (published 2021-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install pg-hstore
pnpm add pg-hstore
yarn add pg-hstore
bun add pg-hstore
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.3.4 |
| Published | 2021-06-09 |
| First published | 2012-06-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.x |
| Dependencies | 1 |
| Unpacked size | 21.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 108 |
| Author | Seth Carney |
| Maintainers | scarney |
| Keywords | pg, postgres, hstore |

## Links

- npm: https://www.npmjs.com/package/pg-hstore
- Repository: https://github.com/scarney81/pg-hstore
- Issues: https://github.com/scarney81/pg-hstore/issues
- npm.io page: https://npm.io/package/pg-hstore

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) ^1.13.1

## Recent versions

- 2.3.4 (latest) — 2021-06-09
- 2.3.3 — 2019-06-03
- 2.3.2 — 2015-03-31
- 2.3.1 — 2015-01-08
- 2.3.0 — 2015-01-08
- 2.2.0 — 2014-10-20
- 2.1.2 — 2014-08-14
- 2.1.1 — 2014-08-06
- 2.1.0 — 2014-05-20
- 2.0.0 — 2014-03-10
- 1.1.0 — 2014-03-10
- 1.0.4 — 2014-01-12
- 1.0.3 — 2013-01-30
- 1.0.2 — 2012-12-05
- 1.0.1 — 2012-06-23
- … 1 more at https://npm.io/package/pg-hstore/versions

## README

[![Build Status](https://travis-ci.org/scarney81/pg-hstore.png)](https://travis-ci.org/[YOUR_GITHUB_USERNAME]/[YOUR_PROJECT_NAME])

pg-hstore
===========

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

## Install pg-hstore

```bash
$ npm install pg-hstore
```

## Usage
### stringify

```javascript
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

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

---
_Source: https://npm.io/package/pg-hstore · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
