source: node_modules/postgres-array/readme.md@ 2d1ec46

main
Last change on this file since 2d1ec46 was 62b2964, checked in by Klimentina Efremova <klimentina08642@…>, 2 weeks ago

Project Handcraft Marketplace

  • Property mode set to 100644
File size: 692 bytes
RevLine 
[62b2964]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
16var postgresArray = require('postgres-array')
17
18postgresArray.parse('{1,2,3}', (value) => parseInt(value, 10))
19//=> [1, 2, 3]
20```
21
22## API
23
24#### `parse(input, [transform])` -> `array`
25
26##### input
27
28*Required*
29Type: `string`
30
31A Postgres array string.
32
33##### transform
34
35Type: `function`
36Default: `identity`
37
38A function that transforms non-null values inserted into the array.
39
40
41## License
42
43MIT © [Ben Drucker](http://bendrucker.me)
Note: See TracBrowser for help on using the repository browser.