MCPcopy Index your code
hub / github.com/es-shims/RegExp.escape

github.com/es-shims/RegExp.escape @v2.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.1 ↗ · + Follow
1 symbols 2 edges 9 files 0 documented · 0% 3 cross-repo links updated 6mo ago★ 44
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

regexp.escape Version Badge

github actions coverage License Downloads

npm badge

A robust & optimized ES3-compatible polyfill for the RegExp.escape proposal.

Use it to safely escape RegExp special tokens for use in new RegExp.

Use it as a standalone function, or call its shim method to install it as a polyfill.

Example

var escape = require('regexp.escape');
var assert = require('assert');

var str = 'hello. how are you?';
var regex = new RegExp('^' + escape(str) + '$');
assert.match(str, regex);
assert.doesNotMatch('hello, how are you!', regex);

Tests

Simply clone the repo, npm install, and run npm test

Core symbols most depended-on inside this repo

codePointStringToNum
called by 2
implementation.js

Shape

Function 1

Languages

TypeScript100%

Modules by API surface

implementation.js1 symbols

Used by 3 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add RegExp.escape \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact