- 授权协议: MIT
- 开发语言: Google Go
- 操作系统: 跨平台
- 软件首页: https://github.com/dop251/goja
- 软件文档: https://github.com/dop251/goja
- 官方下载: https://github.com/dop251/goja
软件介绍
goja 是一个 Go 实现的 ECMAScript 5.1(+)。
它不是 V8 或 SpiderMonkey 或任何其他通用 JavaScript 引擎的替代品,因为它更慢。它可以作为一种嵌入式脚本语言使用,或者可以作为避免非 Go 相关性的一种方式。
灵感来源于 otto 。
特性
完全支持 ECMAScript 5.1
通过几乎所有用 es5id 标记的 tc39 测试
平均比 otto 快6-7倍,同时使用相当少的内存
基本示例
vm := goja.New()
v, err := vm.RunString("2 + 2")
if err != nil {
panic(err)
}
if num := v.Export().(int64); num != 4 {
panic(num)
}
Learning JavaScript
Shelley Powers / Oreilly & Associates Inc / 2006-10-17 / $29.99
As web browsers have become more capable and standards compliant, JavaScript has grown in prominence. JavaScript lets designers add sparkle and life to web pages, while more complex JavaScript has led......一起来看看 《Learning JavaScript》 这本书的介绍吧!
