{"repo":"vitaly-t/pg-minify","free":true,"listed":false,"github":"https://github.com/vitaly-t/pg-minify","clone":"git clone https://github.com/vitaly-t/pg-minify.git","description":"Minifies PostgreSQL scripts.","language":"JavaScript","stars":53,"topics":["postgresql","sql","minify","comment"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg-minify ========= Minifies PostgreSQL scripts, reducing the IO usage. Features: Removes / multi-line / (including nested) and --single-line comments Preserves special/copyright multi-line comments that start with / ! Concatenates multi-line strings into a single line with \\n Fixes multi-line text, prefixing it with E where needed Removes redundant line gaps: line breaks, tabs and spaces Provides basic parsing and error detection for invalid SQL Flattens the resulting script into a single line Optionally, compresses SQL for minimum space Installing Usage with compression (removes all unnecessary spaces): The library's distribution includes [TypeScript] declarations. Error Handling [SQLParsingError] is thrown on failed SQL parsing: API minify(sql, [options]) ⇒ String Minifies SQL into a single line, according to the options . options.compress ⇒ Boolean Compresses / uglifies the SQL to its bare minimum, by removing all unnecessary spaces. false (default) - keeps minimum spaces, for easier read true - removes all unnecessary spaces See also: [SQL Compression]. options.removeAll ⇒ Boolean Removes everything, i.e. special/copyright multi-line comments that start with / ! will be removed as well. Limitations Double-dollar $$ string escaping, which avoids escaping single quotes, is not supported. See #12. License Copyright © 2025 Vitaly Tomilov; Released under the MIT license. [SQLParsingError]:https://github.com/vitaly-t/pg-minify/blob/master/lib/error.js#L22 [TypeScript]:https://","default_branch":null,"files":null,"tree":[],"storefront":"/r/vitaly-t","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vitaly-t/pg-minify/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}