Package Exports
- pg-tsquery
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 (pg-tsquery) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pg text-search sanitizer 
Like plainto_tsquery operator but allows any inputs without letting pg throws
const tsquery = require('pg-tsquery');
pool.query("SELECT * FROM tabby WHERE to_tsvector(col) @@ to_tsquery($1)", [tsquery(str)])
Examples of inputs
foo barfoo -baris likefoo !bar,foo + !barandfoo&!barthe final formfoo bar,bipis likefoo+bar | bipandfoo&bar|bipthe final form
Notes:
()<:are ignored- it's safe to add
:*at the end of the result of tsquery, if it's not empty, for substring matching