Babel plugin that transforms ES2015 sticky regex literals to ES5-compatible RegExp constructor calls
Overall
score
100%
Enable via Babel config entry transform-sticky-regex with @babel/core peer requirement
Config entry
100%
100%
Babel core usage
100%
100%
Sticky rewrite
100%
100%
Non-sticky untouched
100%
100%
Babel plugin factory with Babel 7 version assertion
Plugin usage
100%
100%
Version gate
0%
90%
Sticky rewrite
100%
100%
Flag fidelity
100%
100%
Passthrough
100%
100%
Literal scope
100%
100%
Emit pattern and flags as string literals to avoid raw pattern mutation
Plugin configured
100%
100%
Sticky rewritten
100%
100%
Flags preserved
100%
100%
Non-sticky intact
100%
100%
Core API use
100%
100%
Skip transformation for non-sticky regex literals
Uses plugin
100%
100%
Babel API
100%
100%
Plain literals intact
100%
100%
Non-sticky flags kept
100%
100%
Sticky transformed
100%
100%
Rewrite sticky regex literals to RegExp constructor preserving pattern and flags
Plugin use
100%
100%
Sticky rewrite
100%
100%
Flag preservation
100%
100%
Non-sticky passthrough
100%
100%
Constructor untouched
100%
100%
Scope limited to regex literals; RegExp constructor calls remain unchanged
Plugin wiring
100%
100%
Sticky rewrite
100%
100%
Flag preservation
100%
100%
Non-sticky untouched
100%
100%
RegExp constructors
100%
100%
Install with Tessl CLI
npx tessl i tessl/npm-babel-plugin-transform-es2015-sticky-regex