sql-escape-string

JSON →
library 1.1.0 ·javascript
verified Jun 5, 2026

A simple SQL string escape utility that escapes single quotes and optionally backslashes to prevent SQL injection. Version 1.1.0 is stable with no recent updates; it is derived from the mysqljs/sqlstring library but adds an option to disable backslash escaping, which is non-standard SQL. Unlike general-purpose escape libraries, this package focuses solely on SQL string escaping and is lightweight with no dependencies.