Replace javascript module otto with goja (#4631)

* Move plugin javascript to own package with goja
* Use javascript package in scraper

Remove otto
This commit is contained in:
WithoutPants
2024-03-14 11:03:40 +11:00
committed by GitHub
parent 49cd214c9d
commit 9ceea952b6
12 changed files with 381 additions and 288 deletions

View File

@@ -77,6 +77,14 @@ func (m ArgsMap) Float(key string) float64 {
return ret
}
func (m ArgsMap) ToMap() map[string]interface{} {
ret := make(map[string]interface{})
for k, v := range m {
ret[k] = v
}
return ret
}
// PluginInput is the data structure that is sent to plugin instances when they
// are spawned.
type PluginInput struct {