sql-escaper
npmv1.5.1TypeScriptπ‘οΈ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).
Safe to adopt
Yes β sql-escaper scores well across adoption, maintenance, weight, supply chain, and licensing. 5M downloads per week and 1 known dependents. Last published 59 days ago. 14 releases in the last 2 years.
- AAdoption: grade A, Excellent.
5M downloads per week and 1 known dependents.
- AMaintenance: grade A, Excellent.
Last published 59 days ago. 14 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 58 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 2 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT β permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph β downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding sql-escaper to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- bun >=1.0.0, deno >=2.0.0, node >=12.0.0
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the sql-escaper README.
import { escape, escapeId, format, raw } from 'sql-escaper';
escape("Hello 'World'", true);
// => "'Hello \\'World\\''"
escapeId('table.column');
// => '`table`.`column`'
format('SELECT * FROM ?? WHERE id = ?', ['users', 42]);
// => 'SELECT * FROM `users` WHERE id = 42'
format('INSERT INTO users SET ?', [{ name: 'foo', email: 'bar@test.com' }]);
// => "INSERT INTO users SET `name` = 'foo', `email` = 'bar@test.com'"
sql-escaper vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| sql-escaperthis page | 5M | 1 | MIT | 1 month ago |
| kysely | 15.6M | 1 | MIT | 1 day ago |
| drizzle-orm | 19M | 0 | Apache-2.0 | 1 day ago |
| hono | 0 | 4 | MIT | 1 day ago |
| knex | 0 | 1 | MIT | 1 day ago |
| tsx | 61.9M | 26 | MIT | 1 day ago |
Dependencies
Declared by sql-escaper v1.5.1. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (11)
Used by
Popular packages that depend on sql-escaper.
Relationship graph
Dependencies (left) and dependents (right) of sql-escaper.
Frequently installed together
TypeScript definitions for node
Prettier is an opinionated code formatter
A Long class for representing a 64-bit two's-complement integer value.
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
Module that helps you write generated functions in Node
Convert character encodings in pure javascript.
AWS RDS SSL certificates bundles.
Extract meaning from JS Errors
sql named placeholders to unnamed compiler
The fastest javascript implementation of a double-ended queue. Used by the official Redis, MongoDB, MariaDB & MySQL libraries for Node.js and many other libraries. Maintains compatability with deque.
Release history
14 releases in the last two years, typically about 0 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.5.1latest | 1 month ago | 58 KB | MIT |
| 1.5.0 | 1 month ago | 58 KB | MIT |
| 1.4.0 | 2 months ago | 55 KB | MIT |
| 1.3.3 | 6 months ago | 44 KB | MIT |
| 1.3.2 | 6 months ago | 43 KB | MIT |
| 1.3.1 | 7 months ago | 42 KB | MIT |
| 1.3.0 | 7 months ago | 42 KB | MIT |
| 1.2.0 | 7 months ago | 41 KB | MIT |
| 1.1.2 | 7 months ago | 41 KB | MIT |
| 1.1.1 | 7 months ago | 40 KB | MIT |
| 1.1.0 | 7 months ago | 40 KB | MIT |
| 1.0.0 | 7 months ago | 33 KB | MIT |
| 0.1.1 | 7 months ago | 33 KB | MIT |
| 0.1.0 | 7 months ago | 33 KB | MIT |
Overview
sql-escaper is an npm package that π‘οΈ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno). It is very popular, with about 5M downloads per week and 1 known dependents in the graph. The latest version is 1.5.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need π‘οΈ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno) and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (5M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use sql-escaper?
Yes β sql-escaper scores well across adoption, maintenance, weight, supply chain, and licensing. 5M downloads per week and 1 known dependents. Last published 59 days ago. 14 releases in the last 2 years.
How do I install sql-escaper?
Run `npm install sql-escaper` to add sql-escaper to your npm project.
What license is sql-escaper released under?
sql-escaper is distributed under the MIT license.
How popular is sql-escaper?
sql-escaper has approximately 5,045,177 downloads per week and 1 known dependent packages.
Is sql-escaper still maintained?
The most recent release of sql-escaper (v1.5.1) was published 1 month ago.
Does sql-escaper run install scripts?
No. sql-escaper does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.