diff --git a/otto/main.go b/otto/main.go index 96820c2..6f4d0fe 100644 --- a/otto/main.go +++ b/otto/main.go @@ -6,8 +6,11 @@ import ( "io/ioutil" "os" "github.com/robertkrimen/otto" + "github.com/robertkrimen/otto/underscore" ) +var underscoreFlag *bool = flag.Bool("underscore", true, "Load underscore into the runtime environment") + func main() { flag.Parse() var script []byte @@ -26,6 +29,9 @@ func main() { os.Exit(64) } } + if !*underscoreFlag { + underscore.Disable() + } Otto := otto.New() _, err = Otto.Run(string(script)) if err != nil {