MCPcopy Create free account
hub / github.com/Effect-TS/tsgo / parseStringArrayStrict

Function parseStringArrayStrict

etscore/options_parser.go:382–396  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

380}
381
382func parseStringArrayStrict(value any) ([]string, bool) {
383 arr, ok := value.([]any)
384 if !ok {
385 return nil, false
386 }
387 result := make([]string, 0, len(arr))
388 for _, item := range arr {
389 s, ok := item.(string)
390 if !ok {
391 return nil, false
392 }
393 result = append(result, s)
394 }
395 return result, true
396}
397
398func parseStringArrayLossy(value any) []string {
399 arr, ok := value.([]any)

Callers 1

parseOverrideOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected