postgres-array
Parse postgres array columns
Last updated 2 years ago by bendrucker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install postgres-array 
SYNC missed versions from official npm registry.

postgres-array tests

Parse postgres array columns

Install

npm install --save postgres-array

Usage

const { parse } = require('postgres-array')

parse('{1,2,3}', (value) => parseInt(value, 10))
//=> [1, 2, 3]

API

parse(input, [transform]) -> array

input

Required
Type: string

A Postgres array string.

transform

Type: function
Default: identity

A function that transforms non-null values inserted into the array.

License

MIT © Ben Drucker

Current Tags

  • 3.0.4                                ...           latest (2 years ago)

10 Versions

  • 3.0.4                                ...           2 years ago
  • 3.0.3                                ...           2 years ago
  • 3.0.2                                ...           4 years ago
  • 3.0.1                                ...           6 years ago
  • 3.0.0                                ...           6 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.3                                ...           8 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 34
Today 0
This Week 4
This Month 15
Last Day 0
Last Week 2
Last Month 10
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE