or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@babel/runtime@7.28.x
tile.json

tessl/npm-babel--runtime

tessl install tessl/npm-babel--runtime@7.28.0

Babel's modular runtime helpers that provide transpilation support for modern JavaScript features

Agent Success

Agent success rate when using this tile

94%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.19x

Baseline

Agent success rate without this tile

79%

task.mdevals/scenario-6/

Transformation Result Inspector

Build a utility that transforms JavaScript code and extracts specific fields from the transformation result object.

Capabilities

Extract transformed code

  • Transform the code const x = () => {}; and return the code field from the result @test
  • Transform empty string "" and verify the returned code is an empty string @test

Extract AST from result

  • Transform code const greeting = "hello"; with AST enabled and return the ast field from the result @test
  • Transform function add(a, b) { return a + b; } and verify the returned ast has a type property equal to "File" @test

Extract metadata from result

  • Transform code and return the metadata field from the result object @test

Extract source maps

  • Transform code const z = 10; with sourceMaps enabled and return the map field from the result @test

Implementation

@generates

API

/**
 * Transforms JavaScript code and returns an object containing
 * specified fields from the transformation result.
 *
 * @param {string} code - The JavaScript code to transform
 * @param {object} options - Babel transformation options (plugins, sourceMaps, etc.)
 * @param {string[]} fields - Array of field names to extract from the result (e.g., ['code', 'ast', 'map'])
 * @returns {object} An object containing the requested fields from the transformation result
 */
function transformAndExtract(code, options, fields) {
  // IMPLEMENTATION HERE
}

module.exports = { transformAndExtract };

Dependencies { .dependencies }

@babel/core { .dependency }

Provides JavaScript code transformation functionality.