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

sql-formatter

Package Overview
Dependencies
Maintainers
3
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-formatter - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

src/sqlFormatter.d.ts

3

package.json
{
"name": "sql-formatter",
"version": "4.0.0",
"version": "4.0.1",
"description": "Format whitespace in a SQL query to make it more readable",
"license": "MIT",
"main": "lib/sqlFormatter.js",
"types": "src/sqlFormatter.d.ts",
"bin": {

@@ -8,0 +9,0 @@ "sql-formatter": "./bin/sqlfmt.js"

@@ -37,5 +37,5 @@ # SQL Formatter [![NPM version](https://img.shields.io/npm/v/sql-formatter.svg)](https://npmjs.com/package/sql-formatter) [![Build Status](https://travis-ci.org/zeroturnaround/sql-formatter.svg?branch=master)](https://travis-ci.org/zeroturnaround/sql-formatter) [![Coverage Status](https://coveralls.io/repos/github/zeroturnaround/sql-formatter/badge.svg?branch=master)](https://coveralls.io/github/zeroturnaround/sql-formatter?branch=master)

```js
import sqlFormatter from 'sql-formatter';
import { format } from 'sql-formatter';
console.log(sqlFormatter.format('SELECT * FROM tbl'));
console.log(format('SELECT * FROM tbl'));
```

@@ -55,3 +55,3 @@

```js
sqlFormatter.format('SELECT * FROM tbl', {
format('SELECT * FROM tbl', {
language: 'spark', // Defaults to "sql" (see the above list of supported dialects)

@@ -68,3 +68,3 @@ indent: ' ', // Defaults to two spaces

// Named placeholders
sqlFormatter.format("SELECT * FROM tbl WHERE foo = @foo", {
format("SELECT * FROM tbl WHERE foo = @foo", {
params: {foo: "'bar'"}

@@ -74,3 +74,3 @@ }));

// Indexed placeholders
sqlFormatter.format("SELECT * FROM tbl WHERE foo = ?", {
format("SELECT * FROM tbl WHERE foo = ?", {
params: ["'bar'"]

@@ -77,0 +77,0 @@ }));

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