depscope
Packages
IntegrateAPI DocsCuratorBenchmarkCoverage
Sign inGet API access
depscope/bugs/npm/escape-string-regexp
This package has limited bug data (1 entry). Check back later or see the package health page for the full signal.

escape-string-regexp known bugs

npm

1 known bug in escape-string-regexp, with affected versions, fixes and workarounds. Sourced from upstream issue trackers.

View package health \u2192Breaking changes \u2192
1
bugs

Known bugs

SeverityAffectedFixed inTitleStatusSource
mediumany\u2014
Hyphens in Unicode mode
With the current behavior of escaping `-`, there is a problem if used in a Unicode regex. You can see that: ```js const esc = require('escape-string-regexp'); new RegExp(esc('-'), 'u'); ``` gives: > Invalid regular expression: /\-/: Invalid escape because this does also: ```js new RegExp('\\-', 'u'); ``` Would seem to call for a Unicode mode? (The hyphen would still need escaping (and be safe to use) within a character class though.) I don't know whether you'd want to get into such parsing, but just sharing as it is something I came across.
fixedgithub:20

API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/bugs/npm/escape-string-regexp
DepScope

Package intelligence for AI agents. 19 ecosystems.

Resources
API DocumentationHallucination BenchmarkFor EnterpriseSwagger / OpenAPIPopular PackagesCoverageAI Plugin SetupWatch the pitch (60s)
Legal
Legal hubPrivacy PolicyTerms of ServiceCookie PolicyAcceptable UseAttributionDPASub-processorsSecurityImprintContact中文
© 2026 Cuttalo srl — Italy · VAT IT03242390734Built for AI agents