Sql Formatter
SQL Prettier fork fromInstall
Get the latest version from NPM:
npm install sql-prettier
Usage
import sqlPrettier from 'sql-prettier';
console.log(sqlPrettier.format('SELECT supplier_name, city FROM suppliers WHERE supplier_id > 500'));
This will output:
SELECT supplier_name,
city
FROM suppliers
WHERE supplier_id > 500