sql-formatter
Advanced tools
Comparing version 4.0.0 to 4.0.1
{ | ||
"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 @@ })); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
796241
48
8530