# pg-sanitize

> PG SQL Injection prevention with sanitize techniq

Latest version **1.0.10** (published 2024-07-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install pg-sanitize
pnpm add pg-sanitize
yarn add pg-sanitize
bun add pg-sanitize
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2024-07-23 |
| First published | 2020-08-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Tonmanna |
| Maintainers | tonmanna |

## Links

- npm: https://www.npmjs.com/package/pg-sanitize
- Repository: https://github.com/tonmanna/sanitizeSQL
- Homepage: https://github.com/tonmanna/sanitizeSQL#readme
- Issues: https://github.com/tonmanna/sanitizeSQL/issues
- npm.io page: https://npm.io/package/pg-sanitize

## Recent versions

- 1.0.10 (latest) — 2024-07-23
- 1.0.9 — 2022-08-31
- 1.0.8 — 2020-08-25
- 1.0.7 — 2020-08-24
- 1.0.6 — 2020-08-24
- 1.0.5 — 2020-08-24
- 1.0.4 — 2020-08-24
- 1.0.3 — 2020-08-24
- 1.0.2 — 2020-08-24
- 1.0.1 — 2020-08-24
- 1.0.0 — 2020-08-24

## README

# PG Sanitize

We used this libary for prevention our production SQL statement.
Just need to purify SQL Query befor send it to execution method.

## How to used

```Type Script
 import { sanitizeSQL } from 'pg-sanitize'
 let SQL = 'SELECT * from username; DROP TABLE username'
 SQL = sanitizeSQL(SQL);
 
 // This helper is not remove DROP TABLE but Query will be exception beacuse syntax is not correct.
```

---
_Source: https://npm.io/package/pg-sanitize · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
