examples/StrongerGS/gsnodejs/node_modules/postgres-array
yinyuan f8e2679b5a StrongerGSÊý¾ݿ⹤¾ßÏä 2022-09-20 10:22:00 +08:00
..
index.d.ts StrongerGSÊý¾ݿ⹤¾ßÏä 2022-09-20 10:22:00 +08:00
index.js StrongerGSÊý¾ݿ⹤¾ßÏä 2022-09-20 10:22:00 +08:00
license StrongerGSÊý¾ݿ⹤¾ßÏä 2022-09-20 10:22:00 +08:00
package.json StrongerGSÊý¾ݿ⹤¾ßÏä 2022-09-20 10:22:00 +08:00
readme.md StrongerGSÊý¾ݿ⹤¾ßÏä 2022-09-20 10:22:00 +08:00

readme.md

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