func Class(class string, path ...string) Value {
	switch class {
	case "Object":
		return Value{object}
	case "Array":
		return Value{array}
	}
	key := class
	if len(path) != 0 {
		key += "." + strings.Join(path, ".")
	}
	mu.RLock()
	v := classes[key]
	mu.RUnlock()
	if v.isZero() {
		v = Get(class, path...)
		mu.Lock()
		classes[key] = v
		mu.Unlock()
	}
	return v
}
Class searches for a class in global scope.
It caches results, so the lookup should be faster than calling Get.
package js
import (
	"strings"
	"sync"
)
var (
	object = global.Get("Object")
	array  = global.Get("Array")
)
var (
	mu      sync.RWMutex
	classes = make(map[string]Value)
)
type Obj = map[string]interface{}
type Arr = []interface{}
func Get(name string, path ...string) Value {
	return Value{global}.Get(name, path...)
}
func Set(name string, v interface{}) {
	Value{global}.Set(name, v)
}
func Call(name string, args ...interface{}) Value {
	return Value{global}.Call(name, args...)
}