Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / 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