babel-plugin-transform-mangle
Converts var longname; to var a;
Last updated 10 years ago by boopathi .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install babel-plugin-transform-mangle 
SYNC missed versions from official npm registry.

babel-plugin-transform-mangle

Mangle Identifiers that can be shortened

Install

npm install babel-plugin-transform-mangle --save-dev

Example

In :

import MyAwesomeLib from 'my-awesome-lib';
const ReallyLongName = "1";
class BlahBlahBlahBlah {
  method() {}
}
function doSomethingWithAReallyLongName() {
  var localVariable, someIdentifier;
}

Out :

import a from 'my-awesome-lib';
const b = "1";
class c {
  method() {}
}
function d() {
  var a, b;
}

Options

  • keep_fnames: [Default: false] Don't mangle function names for FunctionExpressions and FunctionDeclarations - Useful for code depending on fn.name.

  • mangle_globals: [Default: false] Mangle variables in the outermost scope.

Current Tags

  • 0.1.7                                ...           latest (10 years ago)

12 Versions

  • 0.1.7                                ...           10 years ago
  • 0.1.6                                ...           10 years ago
  • 0.1.5                                ...           10 years ago
  • 0.1.4                                ...           10 years ago
  • 0.1.3                                ...           10 years ago
  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
  • 0.0.10                                ...           10 years ago
  • 0.0.8                                ...           10 years ago
  • 0.0.7                                ...           10 years ago
  • 0.0.3                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 9
Last Month 12
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |