* 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)
| 368 | * document so unchanged objects are not re-uploaded every sync. |
| 369 | */ |
| 370 | function 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. |
no test coverage detected