sql-escaper
Advanced tools
+3
-3
@@ -107,5 +107,5 @@ "use strict"; | ||
| }; | ||
| const findSetKeyword = (sql) => { | ||
| const findSetKeyword = (sql, startFrom = 0) => { | ||
| const length = sql.length; | ||
| for (let position = 0; position < length; position++) { | ||
| for (let position = startFrom; position < length; position++) { | ||
| const code = sql.charCodeAt(position); | ||
@@ -356,3 +356,3 @@ const lower = code | 32; | ||
| escapedValue = (0, exports.objectToValues)(currentValue, timezone); | ||
| setIndex = -1; | ||
| setIndex = findSetKeyword(sql, placeholderEnd); | ||
| } | ||
@@ -359,0 +359,0 @@ else |
+3
-3
@@ -83,5 +83,5 @@ import { Buffer } from "node:buffer"; | ||
| }; | ||
| const findSetKeyword = (sql) => { | ||
| const findSetKeyword = (sql, startFrom = 0) => { | ||
| const length = sql.length; | ||
| for (let position = 0; position < length; position++) { | ||
| for (let position = startFrom; position < length; position++) { | ||
| const code = sql.charCodeAt(position); | ||
@@ -264,3 +264,3 @@ const lower = code | 32; | ||
| escapedValue = objectToValues(currentValue, timezone); | ||
| setIndex = -1; | ||
| setIndex = findSetKeyword(sql, placeholderEnd); | ||
| } else escapedValue = escape(currentValue, true, timezone); | ||
@@ -267,0 +267,0 @@ } else escapedValue = escape(currentValue, stringifyObjects, timezone); |
+1
-1
| { | ||
| "name": "sql-escaper", | ||
| "version": "1.3.1", | ||
| "version": "1.3.2", | ||
| "description": "🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
43590
0.26%