JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q62286F
  • License MIT

Evaluate constant expressions

Package Exports

  • babel-plugin-transform-evaluate

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-plugin-transform-evaluate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

babel-plugin-transform-evaluate

Attempt evaluating constant expressions

Install

npm install babel-plugin-transform-evaluate

In

const x = Math.floor(6.5) + 1 * 2 / 3 * 6 % 5 + myValue;
const y = true && false || "default value";

Out

const x = 10 + myValue;
const y = "default value";