• Preparing search index...
  • The search index is not available
@rauschma/helpers
  • @rauschma/helpers
  • lang/regexp
  • escapeForRegExp

Function escapeForRegExp

  • escapeForRegExp(str: string): string

    Implementation of RegExp.escape():

    • Focuses on readability and mirroring the spec, not on efficiency, robustness or security.
    • Proposal: https://github.com/tc39/proposal-regex-escaping
    • Proper polyfill: https://www.npmjs.com/package/regexp.escape

    Parameters

    • str: string

    Returns string

    • Defined in src/lang/regexp.ts:67

Settings

Member Visibility
@rauschma/helpers
  • Loading...

Generated using TypeDoc