tessl install tessl/npm-babel-plugin-transform-es2015-sticky-regex@6.24.0Babel plugin that transforms ES2015 sticky regex literals to ES5-compatible RegExp constructor calls
Agent Success
Agent success rate when using this tile
100%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.03x
Baseline
Agent success rate without this tile
97%
A helper that compiles JavaScript source while applying a sticky-regex transform, ensuring regex literals without the y flag stay untouched.
const re = /abc/; returns code that still contains /abc/; with no constructor wrapper. @testconst re = /foo/gim; keeps the literal as-is, preserving its flags without wrapping it. @testconst re = /bar/y; emits a constructor form that keeps the same pattern and includes the y flag. @test@generates
/**
* Transforms JavaScript source code using a sticky-regex-aware compilation step.
* Returns the transformed code as a string.
*/
export function transformRegexSource(sourceCode) {}Provides the code transformation pipeline.
Applies sticky-regex handling while skipping non-sticky regex literals.