package helpers

func ConvertTypeForJS(s string) string {
	conv := map[string]string{
		"array":   "array",
		"boolean": "boolean",
		"integer": "number",
		"number":  "number",
		"object":  "object",
		"string":  "string",
	}
	return conv[s]
}

package helpers

func ConvertTypeForJS(s string) string {
	v, ok := map[string]string{
		"integer": "number",
	}[s]
	if !ok {
		return s
	}
	return v
}

Return given type when target is not found
Return given type when target is not found
