Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e51f4b

Browse files
committed
docs
1 parent 45e7f5f commit 5e51f4b

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

readme.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# postgres-array [![Build Status](https://travis-ci.org/bendrucker/postgres-array.svg?branch=master)](https://travis-ci.org/bendrucker/postgres-array)
2+
3+
> Parse postgres array columns
4+
5+
6+
## Install
7+
8+
```
9+
$ npm install --save postgres-array
10+
```
11+
12+
13+
## Usage
14+
15+
```js
16+
var postgresArray = require('postgres-array')
17+
18+
postgresArray.parse('{1,2,3}', parseInt);
19+
//=> [1, 2, 3]
20+
```
21+
22+
## API
23+
24+
#### `parse(input, [transform])` -> `array`
25+
26+
##### input
27+
28+
*Required*
29+
Type: `string`
30+
31+
A Postgres array string.
32+
33+
##### transform
34+
35+
Type: `function`
36+
Default: `identity`
37+
38+
A function that transforms non-null values inserted into the array.
39+
40+
41+
## License
42+
43+
MIT © [Ben Drucker](http://bendrucker.me)

0 commit comments

Comments
 (0)