Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-79-npm / uglify-js / uglify-js@2.7.5.js
313 bytesRaw
1 | ; |
2 | |
3 | var ujs = require('uglify-js'); |
4 | var code = '40 + 2'; |
5 | var ast = ujs.parse(code, {}); |
6 | if (ast.body[0].body.operator === '+') { |
7 | var code2 = 'var b = function () {};'; |
8 | var result = ujs.minify(code2, { fromString: true }); |
9 | if (result.code === 'var b=function(){};') { |
10 | console.log('ok'); |
11 | } |
12 | } |
13 |
Built with git-ssb-web