How sindresorhus/escape-string-regexp works
This is a small JavaScript utility library: callers pass a string to the exported function, which rejects non-strings and escapes RegExp metacharacters and hyphens before returning the result. The README also describes embedding escaped output in a RegExp or character class. The graph stays focused on that runtime behavior; it does not map tests or packaging. Source evidence is limited to the README and the sampled implementation and declaration.
Main entry points: index.js Escape string
Components 3
Runtime utility
- Escape string
index.js
Other components
- Library caller
- RegExp construction
Connections 2
- Library caller → Escape string: passes string
readme.md - Escape string → RegExp construction: returns escaped text
readme.md