{"library":"pg-format","type":"library","category":null,"description":"A Node.js implementation of PostgreSQL's format() function for safely creating dynamic SQL queries. Version 1.0.4, stable and minimal, with no dependencies. It escapes SQL identifiers (%I), literals (%L), and simple strings (%s) to help prevent SQL injection. Supports Node buffers, arrays, and objects, including nested arrays for bulk inserts. Unlike other SQL escaping libraries, it mimics PostgreSQL's built-in format() exactly, making it ideal for building queries in Node.js that mirror PL/pgSQL logic. Released under MIT license, maintained on GitHub.","language":"javascript","status":"active","version":"1.0.4","tags":["javascript"],"last_verified":"Fri Jun 05","install":[{"cmd":"npm install pg-format","imports":["const format = require('pg-format');","const { ident } = require('pg-format');","const { withArray } = require('pg-format');"]},{"cmd":"yarn add pg-format","imports":[]},{"cmd":"pnpm add pg-format","imports":[]}],"homepage":"https://github.com/datalanche/node-pg-format","github":"https://github.com/datalanche/node-pg-format","docs":null,"changelog":null,"pypi":null,"npm":"pg-format","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}