postgres-array
Parse postgres array columns
Last updated 7 years ago by bendrucker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (a year ago)

10 Versions

  • 3.0.4                                ...           a year ago
  • 3.0.3                                ...           a year ago
  • 3.0.2                                ...           3 years ago
  • 3.0.1                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           7 years ago
  • 1.0.3                                ...           8 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |