RepoPilot

What types does the function expect and return?

About sindresorhus/escape-string-regexp · 2 messages · last activity 6/8/2026

Question

What types does the function expect and return?

RepoPilot

The search index for this repository has minimal coverage. To see the exact type definitions, you'll need to look directly at the main entry point file. Based on the file list, check:

  • index.js or index.ts (the main export)
  • index.d.ts (if present, for TypeScript type definitions)

From the usage example in the README, we can infer: input is a string, output is a string. But for the precise TypeScript types or JSDoc annotations, read the source file directly.

FOLLOW_UPS:

  • What characters does the function escape?
  • How do I use this in a character class?
  • Does this work with Unicode characters?

Public Q&A. Generated by RepoPilot from the actual source of sindresorhus/escape-string-regexp. AI answers can be incomplete or stale — verify before relying on them.