pg-format-fix
JSON →Node.js implementation of PostgreSQL's format() to safely create dynamic SQL queries. This version 1.0.5 is a minor fix to the archived original pg-format (last version 1.0.4) which contained a bug when the global absolute path is rewritten. It supports escaped SQL identifiers (%I), literals (%L), and simple strings (%s), as well as argument positioning, buffers, arrays, and objects. Useful for building SQL queries safely against SQL injection. Note: the original pg-format is archived and this fork fixes a specific path rewriting bug. Release cadence is low (last update 2022). Differentiator: lightweight, no dependencies, mimics PostgreSQL's format function exactly.
Resources
packagepg-format-fix ↗