Package Exports
- postgresql-tag
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postgresql-tag) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pg-sql-tag
Use ES6 tagged template string to generate query objects which can be escaped by node-postgres
.
Status
Installation
Install the package via npm
:
$ npm install postgresql-tag
Usage
import pgsql from 'pgsql-tag';
const email = readEmailFromUntrustedInput();
// email will be escaped
pg.query(pgsql`SELECT name FROM users WHERE email=${email}`, (err, res) => ...);
License
MIT Clément Fiorio <clement.fiorio@gmail.com>