|
@@ -3,6 +3,8 @@ goja
|
|
|
|
|
|
ECMAScript 5.1(+) implementation in Go.
|
|
ECMAScript 5.1(+) implementation in Go.
|
|
|
|
|
|
|
|
+[](https://godoc.org/github.com/dop251/goja)
|
|
|
|
+
|
|
It is not a replacement for V8 or SpiderMonkey or any other general-purpose JavaScript engine as it is much slower.
|
|
It is not a replacement for V8 or SpiderMonkey or any other general-purpose JavaScript engine as it is much slower.
|
|
It can be used as an embedded scripting language where the cost of making a lot of cgo calls may
|
|
It can be used as an embedded scripting language where the cost of making a lot of cgo calls may
|
|
outweight the benefits of a faster JavaScript engine or as a way to avoid having non-Go dependencies.
|
|
outweight the benefits of a faster JavaScript engine or as a way to avoid having non-Go dependencies.
|
|
@@ -150,3 +152,8 @@ func TestInterrupt(t *testing.T) {
|
|
// err is of type *InterruptError and its Value() method returns whatever has been passed to vm.Interrupt()
|
|
// err is of type *InterruptError and its Value() method returns whatever has been passed to vm.Interrupt()
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
+
|
|
|
|
+NodeJS Compatibility
|
|
|
|
+--------------------
|
|
|
|
+
|
|
|
|
+There is a [separate project](https://github.com/dop251/goja_nodejs) aimed at providing some of the NodeJS functionality.
|