Source-preserving JavaScript transforms
@stackline/redeyed
Wrap or replace selected tokens without rebuilding the source, moving comments, or mutating the caller's configuration.
npm install @stackline/redeyedv1.0.1Node 12+TypeScript 3.9-7.0Esprima default
Runs the production browser bundle
Token transformer
JavaScript source
0 charactersTransformed source
0 tokens0 commentsAST off
Lowest-change migration
Keep existing imports
Use an npm alias to retain the historical package name and callable API.
npm install redeyed@npm:@stackline/redeyedconst redeyed = require('redeyed')Public contract
Synchronous, source-retaining output
| Surface | Purpose | Default |
|---|---|---|
redeyed(code, config, options?) | Tokenize and transform source | Esprima tokenizer |
buildAst | Return a parsed AST with tokens | false |
parser | Use an Esprima-compatible parser | Esprima 4 |
nojoin | Return source splits without joining | false |
Release evidence
Behavior is measured
- 226
- upstream and regression assertions
- 1,230
- differential executions
- 95.59%
- core line coverage
- 174
- Cardinal downstream assertions
Portable reference
Human and machine-readable docs
API, parser boundaries, migration, security, and embedded third-party terms remain readable without client rendering.