Go 实现的 ECMAScript 5.1(+) gojaES51

码农软件 · 软件分类 · 浏览器/JS引擎 · 2019-04-05 07:43:38

软件介绍

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)
}

本文地址:https://codercto.com/soft/d/2890.html

C# Primer Plus

C# Primer Plus

Klaus Michelsen / Sams / 2001-12-15 / USD 49.99

C# Primer Plus is a tutorial based introduction to the C# language and important parts of the .Net Framework. Throughout the book the reader will be exposed to proven principles enabling him to write ......一起来看看 《C# Primer Plus》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换