func plurkModuleLoader(vm *motto.Motto) (otto.Value, error) { module, _ := vm.Object(`({})`) // Set module functions module.Set("addPlurk", plurk_AddPlurk) module.Set("addResponse", plurk_AddResponse) return vm.ToValue(module) }
func requireFromMotto(moduleName string, vm *motto.Motto) (otto.Value, error) { return vm.Require(moduleName, "") }