Skip to content

New removeUseStricts Option and Minor Optimization Improvement

Compare
Choose a tag to compare
@gfranko gfranko released this 09 Feb 17:57
· 146 commits to master since this release

New removeUseStricts Option

  • All use strict statements from your cleaned modules will now be removed by default. If you would like to keep them, then you must turn the removeUseStricts option to false. Like this:
amdclean.clean({
  'code': 'define("example", function() { "use strict"; var example = true; })',
  'removeUseStricts': false
});

Optimization Improvement

  • There has been a minor optimization improvement that will convert empty module definitions to undefined. For example:

AMD

define('example', function() {
});

Standard

var example = undefined;