Preparing for system design interviews?  Try bugzed.com →

pg-format

JSON →
library 1.0.4 ·javascript
verified Jun 5, 2026

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.

total hits 6
actors 1 distinct systems
last hit 20d ago human
GPTBot
3
Humans
3

top countries 🇸🇬 Singapore · 🇺🇸 United States