pg-array
v0.5.0
Published
Convert arrays and delimited strings to PostgreSQL array representation.
Downloads
91
Maintainers
Readme
pg-array
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}'