haste-server/node_modules/uglify-js/tmp/269.js

14 lines
432 B
JavaScript
Raw Normal View History

2012-02-06 20:09:01 +01:00
var jsp = require("uglify-js").parser;
var pro = require("uglify-js").uglify;
var test_code = "var JSON;JSON||(JSON={});";
var ast = jsp.parse(test_code, false, false);
var nonembed_token_code = pro.gen_code(ast);
ast = jsp.parse(test_code, false, true);
var embed_token_code = pro.gen_code(ast);
console.log("original: " + test_code);
console.log("no token: " + nonembed_token_code);
console.log(" token: " + embed_token_code);