MCPcopy Index your code
hub / github.com/simstudioai/sim / resolveExtensions

Function resolveExtensions

apps/sim/connectors/s3/s3.ts:99–106  ·  view source on GitHub ↗

* Parses the comma-separated `extensions` config override into a normalized set * (lowercased, no leading dot). Returns the built-in default set when the * override is empty or contains no usable entries.

(raw: unknown)

Source from the content-addressed store, hash-verified

97 * override is empty or contains no usable entries.
98 */
99function resolveExtensions(raw: unknown): Set<string> {
100 if (typeof raw !== 'string') return DEFAULT_EXTENSIONS
101 const exts = raw
102 .split(',')
103 .map((e) => e.trim().toLowerCase().replace(/^\./, ''))
104 .filter(Boolean)
105 return exts.length > 0 ? new Set(exts) : DEFAULT_EXTENSIONS
106}
107
108/**
109 * Extracts the lowercased file extension from an object key, or '' if none.

Callers 1

s3.tsFile · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected