CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-babel-plugin-transform-es2015-sticky-regex

tessl install tessl/npm-babel-plugin-transform-es2015-sticky-regex@6.24.0

Babel 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%

task.mdevals/scenario-6/

Non-Sticky Regex Pass-Through

A helper that compiles JavaScript source while applying a sticky-regex transform, ensuring regex literals without the y flag stay untouched.

Capabilities

Leaves plain regex unchanged

  • Transforming const re = /abc/; returns code that still contains /abc/; with no constructor wrapper. @test

Preserves other flags without stickiness

  • Transforming const re = /foo/gim; keeps the literal as-is, preserving its flags without wrapping it. @test

Converts sticky regex

  • Transforming const re = /bar/y; emits a constructor form that keeps the same pattern and includes the y flag. @test

Implementation

@generates

API

/**
 * Transforms JavaScript source code using a sticky-regex-aware compilation step.
 * Returns the transformed code as a string.
 */
export function transformRegexSource(sourceCode) {}

Dependencies { .dependencies }

@babel/core { .dependency }

Provides the code transformation pipeline.

@babel/plugin-transform-sticky-regex { .dependency }

Applies sticky-regex handling while skipping non-sticky regex literals.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/babel-plugin-transform-es2015-sticky-regex@6.24.x
tile.json