</>PackageGraphPackageGraph

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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

58 KB
Install size

Unpacked size of this package plus its entire runtime tree.

β€”
Tree depth

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'"
Example truncated β€” see the full README.

sql-escaper vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
sql-escaperthis page5M1MIT1 month ago
kysely15.6M1MIT1 day ago
drizzle-orm19M0Apache-2.01 day ago
hono04MIT1 day ago
knex01MIT1 day ago
tsx61.9M26MIT1 day ago

Dependencies

Declared by sql-escaper v1.5.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (11)

@biomejs/biome ^1.9.4@ianvs/prettier-plugin-sort-imports ^4.7.1@js-temporal/polyfill ^0.5.1@types/node ^26.1.1esbuild ^0.28.1monocart-coverage-reports ^2.12.12packages-update ^2.0.0poku ^4.5.0prettier ^3.9.5tsx ^4.23.0typescript ^7.0.2

Used by

Popular packages that depend on sql-escaper.

Relationship graph

Dependencies (left) and dependents (right) of sql-escaper.

mysql2sql-escaper
sql-escaper dependencies dependents

Frequently installed together

Release history

14 releases in the last two years, typically about 0 days apart.

Recent versions of sql-escaper
VersionPublishedSizeLicense
1.5.1latest1 month ago58 KBMIT
1.5.01 month ago58 KBMIT
1.4.02 months ago55 KBMIT
1.3.36 months ago44 KBMIT
1.3.26 months ago43 KBMIT
1.3.17 months ago42 KBMIT
1.3.07 months ago42 KBMIT
1.2.07 months ago41 KBMIT
1.1.27 months ago41 KBMIT
1.1.17 months ago40 KBMIT
1.1.07 months ago40 KBMIT
1.0.07 months ago33 KBMIT
0.1.17 months ago33 KBMIT
0.1.07 months ago33 KBMIT

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

Keywords

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.