CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel-plugin-transform-es2015-literals

Babel plugin that compiles ES2015 unicode string and number literals to ES5

86

0.97x
Overview
Eval results
Files

task.mdevals/scenario-6/

Browser-Compatible Build Configuration

A build configuration utility that automatically applies ES2015 literal transformations based on target browser environments.

Capabilities

Target-based transformation configuration

  • Given target browsers ["chrome 40", "firefox 50"], the configuration includes literal transformation @test
  • Given target browsers ["chrome 90", "firefox 90"], the configuration excludes literal transformation @test
  • Given a mixed target set including IE 11 and Chrome 100, the configuration includes literal transformation @test

Babel preset-env integration

  • The configuration uses @babel/preset-env with proper target specification @test
  • Binary literals (0b1010) are transformed when targets require it @test
  • Octal literals (0o755) are transformed when targets require it @test

Implementation

@generates

API

/**
 * Creates a Babel configuration that automatically includes
 * ES2015 literal transformations based on target environments.
 *
 * @param {string[]} targets - Array of browser/environment targets (e.g., ["chrome 40", "ie 11"])
 * @returns {Object} Babel configuration object with presets
 */
function createBabelConfig(targets) {
  // IMPLEMENTATION HERE
}

module.exports = { createBabelConfig };

Dependencies { .dependencies }

@babel/preset-env { .dependency }

Provides automatic transformation inclusion based on target environments.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-babel-plugin-transform-es2015-literals

tile.json