Skip to content
/ jz Public

JavaScript + TypeScript ES6 Virtual Machine in pure Go

License

Notifications You must be signed in to change notification settings

andrylavr/jz

Repository files navigation

jz

JavaScript / TypeScript ES6 Virtual Machine in pure Go. Based on:

Example

cmd/example1/main.go

package main

import (
  "github.com/andrylavr/jz"
  "log"
)
import _ "embed"

//go:embed example1.js
var example1 string

func main() {
  vm := jz.New()
  vm.ImportMap["three"] = "https://threejs.org/build/three.js"
  vm.ImportMap["three/addons/"] = "https://threejs.org/examples/jsm/"

  _, err := vm.RunScript("example1.js", example1)
  if err != nil {
    log.Println(err)
  }
}

See more docs here: https://github.com/dop251/goja

About

JavaScript + TypeScript ES6 Virtual Machine in pure Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published