pg-array

0.5.0 • Public • Published

pg-array

Build Status NPM version NPM downloads LICENSE

Convert arrays and delimited strings to PostgreSQL array representation.

$ npm install pg-array

Examples

from comma delimited string
var pgarray = require('pg-array');

pgarray('node, ruby, rust');
//=> '{node,ruby,rust}'
from arbitrary delimited string
var pgarray = require('pg-array');

pgarray('node; ruby; rust', ';');
//=> '{node,ruby,rust}'
from array
var pgarray = require('pg-array');

pgarray(['node', 'ruby', 'rust']);
//=> '{node,ruby,rust}'

License

MIT

Package Sidebar

Install

npm i pg-array

Weekly Downloads

15

Version

0.5.0

License

MIT

Last publish

Collaborators

  • wilmoore