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

Function normalizeEtag

apps/sim/connectors/s3/s3.ts:370–372  ·  view source on GitHub ↗

* Normalizes an ETag from either a ListObjectsV2 XML ` ` element or a * GetObject response header into a stable bare token used in the content hash. * * Strips surrounding double quotes and a leading weak-validator prefix (`W/`). * AWS S3 always returns strong, quoted ETags (including the m

(raw: string)

Source from the content-addressed store, hash-verified

368 * document so unchanged objects are not re-uploaded every sync.
369 */
370function normalizeEtag(raw: string): string {
371 return raw.replace(/^W\//, '').replace(/"/g, '')
372}
373
374/**
375 * Decodes a URL-encoded object key returned when `encoding-type=url` is set.

Callers 2

parseListResponseFunction · 0.85
s3.tsFile · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected