// Auto generate "Motto" module let can run in Javascript VM func GenerateScriptModule(prefix string, name string, script string) string { name = prefix + "_" + name motto.AddModule(name, func(vm *motto.Motto) (otto.Value, error) { return motto.CreateLoaderFromSource(script, "")(vm) }) return name }
func underscore(vm *motto.Motto) (otto.Value, error) { return motto.CreateLoaderFromSource(source(), "")(vm) }