1.0.2 • Published 9 years ago
zupu.js v1.0.2
zupu.js
JS powfull var dump!
不会陷入死循环.比如 :
var a={a1:'a1'};
a.a2=a;
用zupu会得到(在浏览器输出):
[0]this=>Object
this.[0]a1=>String = "a1"
this.[1]a2 = this [0
的结果. 可以遍历 window 对象(除了IE);
<script src="zupu.js"></script>;
document.write(zupu( //变量 ));
后端(nodejs):
var http = require('http');
var zupu = require('zupu.js');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
zupu.init(res);//初始代,只需一次
res.write(zupu(global));
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');