- 授权协议: Apache
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/google/traceur-compiler
- 软件文档: https://github.com/google/traceur-compiler/wiki/LanguageFeatures
软件介绍
Traceur 是一个来自 Google 的 Javascript 编译器,通过它可以体验一些很新并且有趣的 Javascript 语言特性,这些多数是还没有被当前浏览器实现的 ECMAScript 标准或草案,比如:数组比较、类、模块、迭代器、方法参数默认值、Promise等。
以下是几个例子:
数组比较(Array Comprehension):
var array = [for (x of [0, 1, 2]) for (y of [0, 1, 2]) x + '' + y]; expect(array).to.be.eql([ '00', '01', '02', '10', '11', '12', '20', '21', '22' ]);
更精简的函数定义语法(Arrow Functions):
var square = (x) => {
return x * x;
};
var square2 = x => x * x;
var objectify = x => ({ value: x }); // Immediate return of an object literal must be wrapped in parentheses
expect(square(4)).to.be.eql(16);
expect(square2(4)).to.be.eql(16);
expect(objectify(1)).to.be.eql({ value: 1 });Promises:
function timeout(ms) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}
timeout(100).then(() => {
console.log('done');
});更详细的语言特性列表,请参考:https://github.com/google/traceur-compiler/wiki/LanguageFeatures
CSS3 Solutions
Marco Casario / Apress / 2012-8-13 / GBP 35.50
CSS3 brings a mass of changes, additions, and improvements to CSS across a range of new modules. Web designers and developers now have a whole host of new techniques up their sleeves, from working wit......一起来看看 《CSS3 Solutions》 这本书的介绍吧!
URL 编码/解码
URL 编码/解码
XML、JSON 在线转换
在线XML、JSON转换工具
