<commit_before>// +build js

package os

import (
	"github.com/gopherjs/gopherjs/js"
)

func init() {
	process := js.Global.Get("process")
	if !process.IsUndefined() {
		args := process.Get("argv")
		Args = make([]string, args.Length()-1)
		for i := 0; i < args.Length()-1; i++ {
			Args[i] = args.Index(i + 1).Str()
		}
	}
}
<commit_msg>os.Args needs to have at least a command name in the browser<commit_after>// +build js

package os

import (
	"github.com/gopherjs/gopherjs/js"
)

func init() {
	process := js.Global.Get("process")
	if process.IsUndefined() {
		Args = []string{"browser"}
		return
	}
	args := process.Get("argv")
	Args = make([]string, args.Length()-1)
	for i := 0; i < args.Length()-1; i++ {
		Args[i] = args.Index(i + 1).Str()
	}
}

{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.010596026490066225, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2611264', 'n_tokens_mistral': 314, 'n_tokens_neox': 300, 'n_words': 68}