babel-plugin-constant-folding

v1.0.1
Compile static constants (ie. code that we can statically determine to be constant at runtime)
babel-plugin

babel-plugin-constant-folding

Compile static constants (ie. code that we can statically determine to be constant at runtime)

Installation

$ npm install babel-plugin-constant-folding

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["constant-folding"]
}

Via CLI

$ babel --plugins constant-folding script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["constant-folding"]
});
npm i babel-plugin-constant-folding

Metadata

  • MIT
  • Whatever
  • Unknown
  • released 6/15/2015

Downloads

Maintainers