Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@curvewise/pg-formatter

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@curvewise/pg-formatter

PostgreSQL SQL syntax beautifier.

  • 1.3.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

pg-formatter

Travis build status Coveralls NPM version Canonical Code Style Twitter Follow

A PostgreSQL SQL syntax beautifier.

Note:

This project is a thin wrapper of https://github.com/darold/pgFormatter. Execution of the module relies on Perl being available on the host system.

Usage

import {
  format
} from 'pg-formatter';

format(`SELECT foo FROM bar`);

Configuration

ConfigurationFormatDefaultDescriptionpgFormatter equivalent
anonymizebooleanfalseObscure all literals in queries, useful to hide confidential data before formatting.anonymize
functionCasestring ("unchanged", "lowercase", "uppercase", "capitalize")unchangedChange the case of the function names.function-case
keywordCasestring ("unchanged", "lowercase", "uppercase", "capitalize")unchangedChange the case of the reserved keyword.keyword-case
noRcFilebooleanfalseDo not read ~/.pg_format automatically.no-rcfile
placeholderstring (regex)N/ARegex to find code that must not be changed.placeholder
spacesnumber4Number of spaces to indent the code.spaces
stripCommentsbooleanfalseRemove any comment from SQL code.nocomment
tabsbooleanfalseUse tabs instead of spaces. When true, the spaces option is ignored.tabs

Keywords

FAQs

Package last updated on 23 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc