{"_id":"sql-escaper","_rev":"12-aad2ac3877de14e2c76a12b42efedf6f","name":"sql-escaper","dist-tags":{"latest":"1.3.3"},"versions":{"0.1.0":{"name":"sql-escaper","version":"0.1.0","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/wellwelwel"},"license":"MIT","_id":"sql-escaper@0.1.0","maintainers":[{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/wellwelwel/sql-escaper#readme","bugs":{"url":"https://github.com/wellwelwel/sql-escaper/issues"},"dist":{"shasum":"715c9643d8ba7849820b26977ab8ace631953d2c","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-0.1.0.tgz","fileCount":8,"integrity":"sha512-6aoKmHtwUia7YSM7ByaJAl0f3YZOS4bn7bS12kPVu6DQBW0x8m+hAqPmriEFdOS3Sn+k5P9ApJH4wzdUkiLoOA==","signatures":[{"sig":"MEUCIQDTxFDLber/mdi5aTAH8pTB2HChP4oiV7z58t8mccICCgIgRJmtrKPjLQSgznCSx6lXJnZ3/cJ8llrhDao56xG9qjo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33488},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/sponsors/wellwelwel","type":"github"},"gitHead":"e4f4e1df184935e8436d4db0b492adf5fd52ff0d","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"weslley.io","email":"w.eslley@ymail.com"},"repository":{"url":"git+https://github.com/wellwelwel/sql-escaper.git","type":"git"},"_npmVersion":"11.8.0","description":"🛡️ Faster SQL escape and format for **JavaScript** (**Node.js**, **Bun**, and **Deno**).","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_0.1.0_1770207715876_0.9217453567182419","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"sql-escaper","version":"0.1.1","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/wellwelwel"},"license":"MIT","_id":"sql-escaper@0.1.1","maintainers":[{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/wellwelwel/sql-escaper#readme","bugs":{"url":"https://github.com/wellwelwel/sql-escaper/issues"},"dist":{"shasum":"6525cf831bf9785368ded5e8dc9c5fcb4dfc7f2a","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-0.1.1.tgz","fileCount":8,"integrity":"sha512-KuTdks6EJbOW+iGbJIkuGvXtp0WYsl71ZGNxdDfDTWRFngm/prFFl8ZW+tV7e696/owhmelxBV/LPUXtXUpRcg==","signatures":[{"sig":"MEYCIQCwFxr3N1A/C+38l4EPqAw4tnZgumuiibOvAbzvTmVMKgIhAK4GEdvnkgRfqeWYHlrFYeVUHoF8lsK8eyQXJisAnTYN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33318},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/sponsors/wellwelwel","type":"github"},"gitHead":"acca14303af4fd7ecace308e394e95e3939be0eb","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"weslley.io","email":"w.eslley@ymail.com"},"repository":{"url":"git+https://github.com/wellwelwel/sql-escaper.git","type":"git"},"_npmVersion":"11.8.0","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_0.1.1_1770212447578_0.2046438456979518","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"sql-escaper","version":"1.0.0","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/wellwelwel"},"license":"MIT","_id":"sql-escaper@1.0.0","maintainers":[{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/wellwelwel/sql-escaper#readme","bugs":{"url":"https://github.com/wellwelwel/sql-escaper/issues"},"dist":{"shasum":"66e4c4b4ee33e027558bf37e942e2a5c76939b7f","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.0.0.tgz","fileCount":8,"integrity":"sha512-gFOULFusk38yxhe5QUNavhIjt8rhCOBgWSYLWnYF4FSNJwCQpvyfQUXp1kuXDdQbhMUgirWutYNGIUPXqfPtSQ==","signatures":[{"sig":"MEQCIDez1zubysp5satnd7Yo2/IJD37wkxi9tb0JRtE4EZ74AiBOgA9OEPVxup7o+V6aWAH2KhPOq1oRP3t5rh/xtraC0w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sql-escaper@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":33546},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/sponsors/wellwelwel","type":"github"},"gitHead":"b10c508a23404723c71cb88d307afde23944cf90","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4fca1263-7c59-47fe-98ed-96d9b8b2978c"}},"repository":{"url":"git+https://github.com/wellwelwel/sql-escaper.git","type":"git"},"_npmVersion":"11.6.2","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_1.0.0_1770215818051_0.9016262717410033","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"sql-escaper","version":"1.1.0","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/wellwelwel"},"license":"MIT","_id":"sql-escaper@1.1.0","maintainers":[{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/wellwelwel/sql-escaper#readme","bugs":{"url":"https://github.com/wellwelwel/sql-escaper/issues"},"dist":{"shasum":"4d07b09f815c96afa287d07b4c03a86b7af72059","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.1.0.tgz","fileCount":8,"integrity":"sha512-oC+rge4j1jn8bVzWX8kiv92kQR9oT88TcE9kFju2sHNpiMlxZymimmHsf55PMJoxYKZR12seFcKJ0YrZ6wE9KQ==","signatures":[{"sig":"MEQCIC+CUbk5THiPy0KZJdHAtla5nZWx1tr2QSO+FmtfFYJSAiBkgVSuoBCjg8VOP6A8Ds4KpgVxMhbroJc1eNWr/MeU8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sql-escaper@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40610},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/sponsors/wellwelwel","type":"github"},"gitHead":"968d07ecfd55508c1ad74963f06f35415d0aa0cf","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4fca1263-7c59-47fe-98ed-96d9b8b2978c"}},"repository":{"url":"git+https://github.com/wellwelwel/sql-escaper.git","type":"git"},"_npmVersion":"11.6.2","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_1.1.0_1770253589486_0.17532720738386254","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"sql-escaper","version":"1.1.1","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/wellwelwel"},"license":"MIT","_id":"sql-escaper@1.1.1","maintainers":[{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/wellwelwel/sql-escaper#readme","bugs":{"url":"https://github.com/wellwelwel/sql-escaper/issues"},"dist":{"shasum":"c631cbdadd7e99d9b650268e92711e8fdbcedb80","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.1.1.tgz","fileCount":8,"integrity":"sha512-1rPLltPC+m8JtlYqgd9MDUXxjjnllIabiUz1Q9xL+cWeV4hY6a5N0tZxNUBkEJJuGjN4ntXkzZPzq9LEJixY/w==","signatures":[{"sig":"MEQCIFVW+0ijT57bHYTNHGqiwq7u6sYSzt3nL4mApeubeoLvAiAPG/DjdAr7FxZgDaUF5d/GxEJgtD68DwM6G+rHk+q54A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sql-escaper@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40694},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/sponsors/wellwelwel","type":"github"},"gitHead":"e396baedc699ab6e29cfad69bdbc15a8b4e34cfd","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4fca1263-7c59-47fe-98ed-96d9b8b2978c"}},"repository":{"url":"git+https://github.com/wellwelwel/sql-escaper.git","type":"git"},"_npmVersion":"11.6.2","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_1.1.1_1770261268798_0.8281123367452492","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"sql-escaper","version":"1.1.2","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/wellwelwel"},"license":"MIT","_id":"sql-escaper@1.1.2","maintainers":[{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/wellwelwel/sql-escaper#readme","bugs":{"url":"https://github.com/wellwelwel/sql-escaper/issues"},"dist":{"shasum":"dcf4c8674b07784acb6ed7a449a226dcc8e4af75","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.1.2.tgz","fileCount":8,"integrity":"sha512-FlUz/hb5T5gcsJ0WNgGc4I1iiB8G1JCVDkeSsRKNynI2wQxQ/UQep15LFCs2vENBbdoDm1+vV939T5mUbzuXPA==","signatures":[{"sig":"MEYCIQDDL2X87OVCJQKHfWa2jDT4G0lq48cOFd0Xwx6B2ogtxAIhAIKh9N9FbR7oIgMPHC4duLtrH8lyeYntz0Sd8h57hXE6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sql-escaper@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":41871},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/sponsors/wellwelwel","type":"github"},"gitHead":"d6502b3ae666ad45b3a14615facb7937fc139108","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4fca1263-7c59-47fe-98ed-96d9b8b2978c"}},"repository":{"url":"git+https://github.com/wellwelwel/sql-escaper.git","type":"git"},"_npmVersion":"11.6.2","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_1.1.2_1770268323517_0.2679795632068045","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"sql-escaper","version":"1.2.0","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/wellwelwel"},"license":"MIT","_id":"sql-escaper@1.2.0","maintainers":[{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/wellwelwel/sql-escaper#readme","bugs":{"url":"https://github.com/wellwelwel/sql-escaper/issues"},"dist":{"shasum":"c16f80bb0d53d69933cdc42b07210b27e908e13c","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.2.0.tgz","fileCount":8,"integrity":"sha512-O2pJBQe+hrvfJXYY8vYOnk18TtmE8GStuweHaOw1BpLBR8OR3kfaF8ZgyoEYiVIE9SvSwYkR4h9SX0Yo5X7C+g==","signatures":[{"sig":"MEQCIFHBUYH/thajediPi4RzyHpXPpnFhmli811BvunMmKE5AiAwrLbkT4anMhl96ZfUkXdTt/IkovQWYXtTPs3jR/OdgA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sql-escaper@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":42412},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/sponsors/wellwelwel","type":"github"},"gitHead":"63179ca64c1e59679b3a8b0a7dfbc25fc8ab6c15","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4fca1263-7c59-47fe-98ed-96d9b8b2978c"}},"repository":{"url":"git+https://github.com/wellwelwel/sql-escaper.git","type":"git"},"_npmVersion":"11.6.2","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_1.2.0_1770279172777_0.07108438052871002","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"sql-escaper","version":"1.3.0","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/mysqljs"},"license":"MIT","_id":"sql-escaper@1.3.0","maintainers":[{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/mysqljs/sql-escaper#readme","bugs":{"url":"https://github.com/mysqljs/sql-escaper/issues"},"dist":{"shasum":"9c77ecb60f75a88db4a8b33bbd34adf8ad26801f","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.3.0.tgz","fileCount":8,"integrity":"sha512-LIXGvoqSxZy9Rb+AEjzPFuVFWUlYiR6tIQD9OXjSF2TnmbCGRXFvejkKMTJk5aR0QumPowlej/DlI4srmLoH9w==","signatures":[{"sig":"MEYCIQCJxJhLX7zvrW9lxEkam4ok0DNcAQzoWbYfhZo/HnsgCAIhALG1xK5bvDV+xp75kmgP2NM383vnGwWB9iiCyj8veU0A","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sql-escaper@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":42829},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/mysqljs/sql-escaper?sponsor=1","type":"github"},"gitHead":"7213474fa004149b3a7a42f7b90221c8dbdab66e","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:534ec005-ba74-492e-b36b-99937381e754"}},"repository":{"url":"git+https://github.com/mysqljs/sql-escaper.git","type":"git"},"_npmVersion":"11.6.2","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_1.3.0_1770710981272_0.43237807473368584","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"sql-escaper","version":"1.3.1","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/mysqljs"},"license":"MIT","_id":"sql-escaper@1.3.1","maintainers":[{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/mysqljs/sql-escaper#readme","bugs":{"url":"https://github.com/mysqljs/sql-escaper/issues"},"dist":{"shasum":"9a24cf6b26436b4dc74c8708ee08306446527d9f","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.3.1.tgz","fileCount":8,"integrity":"sha512-GLMJGWKzrr7BS5E5+8Prix6RGfBd4UokKMxkPSg313X0TvUyjdJU3Xg7FAhhcba4dHnLy81t4YeHETKLGVsDow==","signatures":[{"sig":"MEYCIQD/uQnjAU092IRWAonyJzUMlnyktNwzjik8McpvVKuKQQIhAO0epCFgX81bRSn7JSHxHnb4fHsXk+udEBuvnxAZH33Y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sql-escaper@1.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":43478},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/mysqljs/sql-escaper?sponsor=1","type":"github"},"gitHead":"f9859b228e9c13028db48bf3880027b5b3cbec12","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:534ec005-ba74-492e-b36b-99937381e754"}},"repository":{"url":"git+https://github.com/mysqljs/sql-escaper.git","type":"git"},"_npmVersion":"11.6.2","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_1.3.1_1770725873273_0.33502102113844145","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"sql-escaper","version":"1.3.2","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"author":{"name":"https://github.com/mysqljs"},"license":"MIT","_id":"sql-escaper@1.3.2","maintainers":[{"name":"sidorares","email":"andrey.sidorov@gmail.com"},{"name":"weslley.io","email":"w.eslley@ymail.com"}],"homepage":"https://github.com/mysqljs/sql-escaper#readme","bugs":{"url":"https://github.com/mysqljs/sql-escaper/issues"},"dist":{"shasum":"b11c68c6541fc05afdf508d52e54af7219455fad","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.3.2.tgz","fileCount":8,"integrity":"sha512-lp+ZDVfSjHt+qAK1jXBTIXBNYnbo7gnaAGwoYTH9bE89kNkXwcu6g0WjJGRsdTKVpY1z70u3Y0IgmnBOoRybHw==","signatures":[{"sig":"MEQCICdRFOnWGn9UiuyV10/uuF6tleTT9yOzXVNuidpXdHhsAiAWKCaxv5YKCLoyGhDEcpIqbtq5OKXlMXez9MBXXQFsfQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sql-escaper@1.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":43590},"main":"./lib/index.js","types":"./lib/index.d.ts","module":"./lib/index.mjs","engines":{"bun":">=1.0.0","deno":">=2.0.0","node":">=12.0.0"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"funding":{"url":"https://github.com/mysqljs/sql-escaper?sponsor=1","type":"github"},"gitHead":"ca998a77fdf879c2f1d35a51c1242f04d960ac9a","scripts":{"lint":"biome lint && prettier --check .","build":"rm -rf ./lib && tsc && npm run build:esm","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","test:bun":"bun poku","benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","test:deno":"deno run -A npm:poku","test:node":"poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:534ec005-ba74-492e-b36b-99937381e754"}},"repository":{"url":"git+https://github.com/mysqljs/sql-escaper.git","type":"git"},"_npmVersion":"11.8.0","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","directories":{},"_nodeVersion":"24.13.1","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","poku":"^3.0.3-canary.13a996a9","esbuild":"^0.27.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.0","@biomejs/biome":"^1.9.4","packages-update":"^2.0.0","monocart-coverage-reports":"^2.12.9","@ianvs/prettier-plugin-sort-imports":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sql-escaper_1.3.2_1770939237824_0.224234904793718","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"name":"sql-escaper","version":"1.3.3","description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","main":"./lib/index.js","module":"./lib/index.mjs","types":"./lib/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/mysqljs/sql-escaper.git"},"bugs":{"url":"https://github.com/mysqljs/sql-escaper/issues"},"author":{"name":"https://github.com/mysqljs"},"funding":{"type":"github","url":"https://github.com/mysqljs/sql-escaper?sponsor=1"},"engines":{"node":">=12.0.0","bun":">=1.0.0","deno":">=2.0.0"},"scripts":{"benchmark":"cd benchmark && npm ci && bash index.sh","build:esm":"esbuild src/index.ts --outfile=lib/index.mjs --platform=node --target=node12 --format=esm","build":"rm -rf ./lib && tsc && npm run build:esm","test:node":"poku","test:bun":"bun poku","test:deno":"deno run -A npm:poku","test:coverage":"mcr --import tsx --config mcr.config.ts npm run test:node","lint":"biome lint && prettier --check .","lint:fix":"biome lint --write && prettier --write .github/workflows/*.yml .","update":"pu minor && npm i && (npm audit fix || true) && npm run lint:fix"},"devDependencies":{"@biomejs/biome":"^1.9.4","@ianvs/prettier-plugin-sort-imports":"^4.7.0","@types/node":"^25.2.0","esbuild":"^0.27.2","monocart-coverage-reports":"^2.12.9","packages-update":"^2.0.0","poku":"^3.0.3-canary.13a996a9","prettier":"^3.8.1","tsx":"^4.21.0","typescript":"^5.9.3"},"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.mjs"},"require":{"types":"./lib/index.d.ts","default":"./lib/index.js"}}},"keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"gitHead":"09e7e650c44f6cf7128783374f771d693e1574f4","_id":"sql-escaper@1.3.3","homepage":"https://github.com/mysqljs/sql-escaper#readme","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-BsTCV265VpTp8tm1wyIm1xqQCS+Q9NHx2Sr+WcnUrgLrQ6yiDIvHYJV5gHxsj1lMBy2zm5twLaZao8Jd+S8JJw==","shasum":"65faf89f048d26bb9a75566b82b5990ddf8a5b7f","tarball":"https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.3.3.tgz","fileCount":8,"unpackedSize":44574,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sql-escaper@1.3.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDLA5v3pDgdVgGKr6UdxekIj7Yi+LyhsjsLwZsBGRXkEAiAEfNLQZzT8huv4EiHw76xkzDQvxAEEXcIqfMDxT18AUA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:534ec005-ba74-492e-b36b-99937381e754"}},"directories":{},"maintainers":[{"name":"sidorares","email":"andrey.sidorov@gmail.com"},{"name":"weslley.io","email":"w.eslley@ymail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sql-escaper_1.3.3_1771266325422_0.34699613528936446"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-04T12:21:55.875Z","modified":"2026-02-16T18:25:25.874Z","0.1.0":"2026-02-04T12:21:56.037Z","0.1.1":"2026-02-04T13:40:47.785Z","1.0.0":"2026-02-04T14:36:58.231Z","1.1.0":"2026-02-05T01:06:29.629Z","1.1.1":"2026-02-05T03:14:28.989Z","1.1.2":"2026-02-05T05:12:03.669Z","1.2.0":"2026-02-05T08:12:52.924Z","1.3.0":"2026-02-10T08:09:41.421Z","1.3.1":"2026-02-10T12:17:53.416Z","1.3.2":"2026-02-12T23:33:57.976Z","1.3.3":"2026-02-16T18:25:25.606Z"},"bugs":{"url":"https://github.com/mysqljs/sql-escaper/issues"},"author":{"name":"https://github.com/mysqljs"},"license":"MIT","homepage":"https://github.com/mysqljs/sql-escaper#readme","keywords":["sql","escape","format","sqlstring","sql-injection","sanitize","query","mysql","node","nodejs","bun","deno","typescript","fast"],"repository":{"type":"git","url":"git+https://github.com/mysqljs/sql-escaper.git"},"description":"🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).","maintainers":[{"name":"sidorares","email":"andrey.sidorov@gmail.com"},{"name":"weslley.io","email":"w.eslley@ymail.com"}],"readme":"# SQL Escaper\n\n[![NPM Version](https://img.shields.io/npm/v/sql-escaper.svg?label=&color=70a1ff&logo=npm&logoColor=white)](https://www.npmjs.com/package/sql-escaper)\n[![NPM Downloads](https://img.shields.io/npm/dm/sql-escaper.svg?label=&logo=npm&logoColor=white&color=45aaf2)](https://www.npmjs.com/package/sql-escaper)\n[![Coverage](https://img.shields.io/codecov/c/github/mysqljs/sql-escaper?label=&logo=codecov&logoColor=white&color=98cc00)](https://app.codecov.io/gh/mysqljs/sql-escaper)<br />\n[![GitHub Workflow Status (Node.js)](https://img.shields.io/github/actions/workflow/status/mysqljs/sql-escaper/ci_node.yml?event=push&label=&branch=main&logo=nodedotjs&logoColor=535c68&color=badc58)](https://github.com/mysqljs/sql-escaper/actions/workflows/ci_node.yml?query=branch%3Amain)\n[![GitHub Workflow Status (Bun)](https://img.shields.io/github/actions/workflow/status/mysqljs/sql-escaper/ci_bun.yml?event=push&label=&branch=main&logo=bun&logoColor=ffffff&color=f368e0)](https://github.com/mysqljs/sql-escaper/actions/workflows/ci_bun.yml?query=branch%3Amain)\n[![GitHub Workflow Status (Deno)](https://img.shields.io/github/actions/workflow/status/mysqljs/sql-escaper/ci_deno.yml?event=push&label=&branch=main&logo=deno&logoColor=ffffff&color=079992)](https://github.com/mysqljs/sql-escaper/actions/workflows/ci_deno.yml?query=branch%3Amain)\n\n## Motivation\n\n**SQL Escaper** is a rework of [**sqlstring**](https://github.com/mysqljs/sqlstring) (created by [**Douglas Wilson**](https://github.com/dougwilson)), by using an **AST**-based approach to parse and format SQL queries while maintaining its same API.\n\n### Rework includes:\n\n- **TypeScript** by default.\n- Support for `Uint8Array` and `BigInt`.\n- Support for both **CJS** and **ESM** exports.\n- Up to [**~40% faster**](#performance) compared to **sqlstring**.\n- Distinguishes when a keyword is used as value.\n- Distinguishes when a column has a keyword name.\n- Distinguishes between multiple clauses/keywords in the same query.\n- Reasonable conservative support for **Node.js v12** _(**sqlstring** supports **Node.js v0.6**)_.\n\n> [!TIP]\n>\n> **SQL Escaper** has the same API as the original [**sqlstring**](https://github.com/mysqljs/sqlstring), so it can be used as a drop-in replacement. If **SQL Escaper** breaks any **API** usage compared to **sqlstring**, please, report it as a bug. [Pull Requests are welcome](./CONTRIBUTING.md).\n\n> [!IMPORTANT]\n>\n> 🔐 **SQL Escaper** is intended to fix a potential [**SQL Injection vulnerability**](https://flattsecurity.medium.com/finding-an-unseen-sql-injection-by-bypassing-escape-functions-in-mysqljs-mysql-90b27f6542b4) reported in 2022. By combining the original [**sqlstring**](https://github.com/mysqljs/sqlstring) with [**mysqljs/mysql**](https://github.com/mysqljs/mysql) or [**MySQL2**](https://github.com/sidorares/node-mysql2), objects passed as values could be expanded into **SQL** fragments, potentially allowing attackers to manipulate query structure. See [sidorares/node-mysql2#4051](https://github.com/sidorares/node-mysql2/issues/4051) for details.\n>\n> Regardless of the `stringifyObjects` value, objects used outside of `SET` or `ON DUPLICATE KEY UPDATE` contexts are always stringified as `'[object Object]'`. This is a security measure to prevent [SQL Injection](https://flattsecurity.medium.com/finding-an-unseen-sql-injection-by-bypassing-escape-functions-in-mysqljs-mysql-90b27f6542b4) and is not interpreted as a breaking change for **sqlstring** usage.\n\n---\n\n## Install\n\n```bash\n# Node.js\nnpm i sql-escaper\n```\n\n```bash\n# Bun\nbun add sql-escaper\n```\n\n```bash\n# Deno\ndeno add npm:sql-escaper\n```\n\n---\n\n### [MySQL2](https://github.com/sidorares/node-mysql2)\n\nFor **MySQL2**, it already uses **SQL Escaper** as its default escaping library since version `3.17.0`, so you just need to update it to the latest version:\n\n```bash\nnpm i mysql2@latest\n```\n\n### [mysqljs/mysql](https://github.com/mysqljs/mysql)\n\nYou can use an overrides in your _package.json_:\n\n```json\n\"dependencies\": {\n  \"mysql\": \"^2.18.1\"\n},\n\"overrides\": {\n  \"sqlstring\": \"npm:sql-escaper\"\n}\n```\n\n- Next, clean the `node_modules` and reinstall the dependencies (`npm i`).\n- Please, note the minimum supported version of **Node.js** is `12`.\n\n---\n\n## Usage\n\nFor _up-to-date_ documentation, always follow the [**README.md**](https://github.com/mysqljs/sql-escaper?tab=readme-ov-file#readme) in the **GitHub** repository.\n\n### Quickstart\n\n```js\nimport { escape, escapeId, format, raw } from 'sql-escaper';\n\nescape(\"Hello 'World'\");\n// => \"'Hello \\\\'World\\\\''\"\n\nescapeId('table.column');\n// => '`table`.`column`'\n\nformat('SELECT * FROM ?? WHERE id = ?', ['users', 42]);\n// => 'SELECT * FROM `users` WHERE id = 42'\n\nformat('INSERT INTO users SET ?', [{ name: 'foo', email: 'bar@test.com' }]);\n// => \"INSERT INTO users SET `name` = 'foo', `email` = 'bar@test.com'\"\n\nescape(raw('NOW()'));\n// => 'NOW()'\n```\n\n### Import\n\n#### ES Modules\n\n```js\nimport { escape, escapeId, format, raw } from 'sql-escaper';\n```\n\n#### CommonJS\n\n```js\nconst { escape, escapeId, format, raw } = require('sql-escaper');\n```\n\n---\n\n## API\n\n### escape\n\nEscapes a value for safe use in SQL queries.\n\n```ts\nescape(value: SqlValue, stringifyObjects?: boolean, timezone?: Timezone): string\n```\n\n```js\nescape(undefined); // 'NULL'\nescape(null); // 'NULL'\nescape(true); // 'true'\nescape(false); // 'false'\nescape(5); // '5'\nescape(\"Hello 'World\"); // \"'Hello \\\\'World'\"\n```\n\n#### Dates\n\nDates are converted to `YYYY-MM-DD HH:mm:ss.sss` format:\n\n```js\nescape(new Date(2012, 4, 7, 11, 42, 3, 2));\n// => \"'2012-05-07 11:42:03.002'\"\n```\n\nInvalid dates return `NULL`:\n\n```js\nescape(new Date(NaN)); // 'NULL'\n```\n\nYou can specify a timezone:\n\n```js\nconst date = new Date(Date.UTC(2012, 4, 7, 11, 42, 3, 2));\n\nescape(date, false, 'Z'); // \"'2012-05-07 11:42:03.002'\"\nescape(date, false, '+01'); // \"'2012-05-07 12:42:03.002'\"\nescape(date, false, '-05:00'); // \"'2012-05-07 06:42:03.002'\"\n```\n\n#### Buffers\n\nBuffers are converted to hex strings:\n\n```js\nescape(Buffer.from([0, 1, 254, 255]));\n// => \"X'0001feff'\"\n```\n\n#### Objects\n\nObjects with a `toSqlString` method will have that method called:\n\n```js\nescape({ toSqlString: () => 'NOW()' });\n// => 'NOW()'\n```\n\nPlain objects are converted to `key = value` pairs:\n\n```js\nescape({ a: 'b', c: 'd' });\n// => \"`a` = 'b', `c` = 'd'\"\n```\n\nFunction properties in objects are ignored:\n\n```js\nescape({ a: 'b', c: () => {} });\n// => \"`a` = 'b'\"\n```\n\nWhen `stringifyObjects` is set to a non-nullish value, objects are stringified instead of being expanded into key-value pairs:\n\n```js\nescape({ a: 'b' }, true);\n// => \"'[object Object]'\"\n```\n\n#### Arrays\n\nArrays are turned into comma-separated lists:\n\n```js\nescape([1, 2, 'c']);\n// => \"1, 2, 'c'\"\n```\n\nNested arrays are turned into grouped lists (useful for bulk inserts):\n\n```js\nescape([\n  [1, 2, 3],\n  [4, 5, 6],\n]);\n// => '(1, 2, 3), (4, 5, 6)'\n```\n\n---\n\n### escapeId\n\nEscapes an identifier (database, table, or column name).\n\n```ts\nescapeId(value: SqlValue, forbidQualified?: boolean): string\n```\n\n```js\nescapeId('id');\n// => '`id`'\n\nescapeId('table.column');\n// => '`table`.`column`'\n\nescapeId('i`d');\n// => '`i``d`'\n```\n\nQualified identifiers (with `.`) can be forbidden:\n\n```js\nescapeId('id1.id2', true);\n// => '`id1.id2`'\n```\n\nArrays are turned into comma-separated identifier lists:\n\n```js\nescapeId(['a', 'b', 't.c']);\n// => '`a`, `b`, `t`.`c`'\n```\n\n---\n\n### format\n\nFormats a SQL query by replacing `?` placeholders with escaped values and `??` with escaped identifiers.\n\n```ts\nformat(sql: string, values?: SqlValue | SqlValue[], stringifyObjects?: boolean, timezone?: Timezone): string\n```\n\n```js\nformat('SELECT * FROM ?? WHERE id = ?', ['users', 42]);\n// => 'SELECT * FROM `users` WHERE id = 42'\n\nformat('? and ?', ['a', 'b']);\n// => \"'a' and 'b'\"\n```\n\nTriple (or more) question marks are ignored:\n\n```js\nformat('? or ??? and ?', ['foo', 'bar', 'fizz', 'buzz']);\n// => \"'foo' or ??? and 'bar'\"\n```\n\nIf no values are provided, the SQL is returned unchanged:\n\n```js\nformat('SELECT ??');\n// => 'SELECT ??'\n```\n\n#### Objects in SET clauses\n\nWhen `stringifyObjects` is falsy, objects used in `SET` or `ON DUPLICATE KEY UPDATE` contexts are automatically expanded into `key = value` pairs:\n\n```js\nformat('UPDATE users SET ?', [{ name: 'foo', email: 'bar@test.com' }]);\n// => \"UPDATE users SET `name` = 'foo', `email` = 'bar@test.com'\"\n\nformat(\n  'INSERT INTO users (name, email) VALUES (?, ?) ON DUPLICATE KEY UPDATE ?',\n  ['foo', 'bar@test.com', { name: 'foo', email: 'bar@test.com' }]\n);\n// => \"INSERT INTO users (name, email) VALUES ('foo', 'bar@test.com') ON DUPLICATE KEY UPDATE `name` = 'foo', `email` = 'bar@test.com'\"\n```\n\nWhen `stringifyObjects` is truthy, objects are always stringified:\n\n```js\nformat('UPDATE users SET ?', [{ name: 'foo' }], true);\n// => \"UPDATE users SET '[object Object]'\"\n```\n\n---\n\n### raw\n\nCreates a raw SQL value that will not be escaped.\n\n```ts\nraw(sql: string): Raw\n```\n\n```js\nescape(raw('NOW()'));\n// => 'NOW()'\n\nescape({ id: raw('LAST_INSERT_ID()') });\n// => '`id` = LAST_INSERT_ID()'\n```\n\nOnly accepts strings:\n\n```js\nraw(42); // throws TypeError\n```\n\n---\n\n### TypeScript\n\nYou can import the available types:\n\n```ts\nimport type { Raw, SqlValue, Timezone } from 'sql-escaper';\n```\n\n---\n\n## Performance\n\nEach benchmark formats `10,000` queries using `format` with `100` mixed values (numbers, strings, `null`, and dates), comparing **SQL Escaper** against the original [**sqlstring**](https://github.com/mysqljs/sqlstring) through [**hyperfine**](https://github.com/sharkdp/hyperfine):\n\n| Benchmark                                | sqlstring | SQL Escaper |       Difference |\n| ---------------------------------------- | --------: | ----------: | ---------------: |\n| Select 100 values                        |  248.8 ms |    178.7 ms | **1.39x faster** |\n| Insert 100 values                        |  247.5 ms |    196.2 ms | **1.26x faster** |\n| SET with 100 values                      |  257.5 ms |    205.2 ms | **1.26x faster** |\n| SET with 100 objects                     |  348.3 ms |    250.5 ms | **1.39x faster** |\n| ON DUPLICATE KEY UPDATE with 100 values  |  466.2 ms |    394.6 ms | **1.18x faster** |\n| ON DUPLICATE KEY UPDATE with 100 objects |  558.2 ms |    433.9 ms | **1.29x faster** |\n\n- See detailed results and how the benchmarks are run in the [**benchmark**](https://github.com/mysqljs/sql-escaper/tree/main/benchmark) directory.\n\n> [!NOTE]\n>\n> Benchmarks ran on [**GitHub Actions**](https://github.com/mysqljs/sql-escaper/blob/main/.github/workflows/ci_benchmark.yml) (`ubuntu-latest`) using **Node.js LTS**.\n> Results may vary depending on runner hardware and runtime version.\n\n---\n\n## Differences from sqlstring\n\n- Requires **Node.js 12+** (the original [**sqlstring**](https://github.com/mysqljs/sqlstring) supports **Node.js** 0.6+)\n\n> [!TIP]\n>\n> The Node.js 12+ requirement is what allows **SQL Escaper** to leverage modern engine optimizations and achieve the [performance gains](#performance) over the original.\n\n---\n\n## Caution\n\n> Based on the original [**sqlstring** documentation](https://github.com/mysqljs/sqlstring#readme).\n\n- The escaping methods in this library only work when the [`NO_BACKSLASH_ESCAPES`](https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_backslash_escapes) SQL mode is disabled (which is the default state for MySQL servers).\n\n- This library performs **client-side escaping** to generate SQL strings. The syntax for `format` may look similar to a prepared statement, but it is not — the escaping rules from this module are used to produce the resulting SQL string.\n\n- When using `format`, **all** `?` placeholders are replaced, including those contained in comments and strings.\n\n- When structured user input is provided as the value to escape, care should be taken to validate the shape of the input, as the resulting escaped string may contain more than a single value.\n\n- `NaN` and `Infinity` are left as-is. MySQL does not support these values, and trying to insert them will trigger MySQL errors.\n\n- The string provided to `raw()` will **skip all escaping**, so be careful when passing in unvalidated input.\n\n---\n\n## Security Policy\n\n[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/mysqljs/sql-escaper/ci_codeql.yml?event=push&label=&branch=main&logo=github&logoColor=white&color=f368e0)](https://github.com/mysqljs/sql-escaper/actions/workflows/ci_codeql.yml?query=branch%3Amain)\n\nPlease check the [**SECURITY.md**](https://github.com/mysqljs/sql-escaper/blob/main/SECURITY.md).\n\n---\n\n## Contributing\n\nSee the [**Contributing Guide**](https://github.com/mysqljs/sql-escaper/blob/main/CONTRIBUTING.md) and please follow our [**Code of Conduct**](https://github.com/mysqljs/sql-escaper/blob/main/CODE_OF_CONDUCT.md) 🚀\n\n---\n\n## Acknowledgements\n\n- [![Contributors](https://img.shields.io/github/contributors/mysqljs/sql-escaper?label=Contributors)](https://github.com/mysqljs/sql-escaper/graphs/contributors)\n- **SQL Escaper** is adapted from [**sqlstring**](https://github.com/mysqljs/sqlstring) ([**MIT**](https://github.com/mysqljs/sqlstring/blob/master/LICENSE)), modernizing it with high performance, TypeScript support and multi-runtime compatibility.\n- Special thanks to [**Douglas Wilson**](https://github.com/dougwilson) for the original **sqlstring** project and its [**contributors**](https://github.com/mysqljs/sqlstring/graphs/contributors).\n\n---\n\n## License\n\n**SQL Escaper** is under the [**MIT License**](https://github.com/mysqljs/sql-escaper/blob/main/LICENSE).\n","readmeFilename":"README.md"}