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.

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
escape-string-regexp bugs — known issues per version | DepScope | DepScope