← back to v135 · regexp-escape
conformance · v135
v135 · regexp-escape — conformance probe
5 assertions drawn from the spec. Each is a single contract the spec text makes. Pass/fail reflects what this browser executed; blocked means the contract was not run because it needs user mediation, hardware, or another unavailable precondition. Open the page in Chrome stable / canary / Firefox / Safari to compare.
0
pass
0
fail
0
blocked
5
total
| id | contract | kind | verdict | detail |
|---|---|---|---|---|
regexp-escape-is-function |
RegExp.escape is exposed as a static method. spec ↗ | typeof | … | |
regexp-escape-string-returns-string |
RegExp.escape('foo') returns a string. spec ↗ | script | … | |
regexp-escape-handles-metacharacters |
RegExp.escape escapes regex metacharacters so the result, used as a pattern, matches the original literal. spec ↗ | script | … | |
regexp-escape-rejects-non-string |
RegExp.escape throws a TypeError when called with a non-string argument. spec ↗ | throws | … | |
regexp-escape-escapes-leading-digit |
RegExp.escape escapes characters that have meaning at the start of a class (e.g. digits) so concatenation is safe. spec ↗ | script | … |