MCPcopy Create free account
hub / github.com/buke/quickjs-go / normalizeString

Function normalizeString

benchcmp/engines.go:335–344  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

333}
334
335func normalizeString(value any) (string, error) {
336 switch current := value.(type) {
337 case string:
338 return current, nil
339 case []byte:
340 return string(current), nil
341 default:
342 return "", fmt.Errorf("unsupported string result type %T", value)
343 }
344}

Callers 2

evalStringMethod · 0.85
evalStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected