File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
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 )
You can’t perform that action at this time.
0 commit comments