npm.io
1.0.3 • Published 10 years ago

normalize-javascript

Licence
MIT
Version
1.0.3
Deps
4
Vulns
1
Weekly
0
Stars
1

normalize-javascript

Normalize javascript code, useful for comparison

normalizes whitespace, semicolons and variable names.

Usage

var normalizeJs = require('normalize-javascript');
normalizeJs(`
  var foo = 1;
function bar() {
  return foo
}`);

// Result:
//
// var _ref = 1;
// function _ref2() {
//   return _ref;
// }
`)

Keywords