Buckets:
| /*! | |
| * negotiator | |
| * Copyright(c) 2026 Blake Embrey | |
| * MIT Licensed | |
| */ | |
| ; | |
| var contentType = require('content-type'); | |
| /** | |
| * Module exports. | |
| * @private | |
| */ | |
| module.exports = parseAccept; | |
| /** | |
| * Parse an Accept-style header. | |
| * @private | |
| */ | |
| function parseAccept(header) { | |
| var values = []; | |
| var index = 0; | |
| while (index < header.length) { | |
| var start = skipOptionalWhitespace(header, index); | |
| var parsed = contentType.parse(header, { comma: true, start: start }); | |
| // `content-type` normalizes the type, but accept methods return original casing. | |
| parsed.type = header.slice(start, start + parsed.type.length); | |
| values.push(parsed); | |
| index = parsed.index + 1; | |
| } | |
| return values; | |
| } | |
| /** | |
| * Skip optional whitespace. | |
| * @private | |
| */ | |
| function skipOptionalWhitespace(header, index) { | |
| var cursor = index; | |
| while (header.charCodeAt(cursor) === 0x20 || header.charCodeAt(cursor) === 0x09) { | |
| cursor++; | |
| } | |
| return cursor; | |
| } | |
Xet Storage Details
- Size:
- 969 Bytes
- Xet hash:
- 78b8cdd5395a3bba9e9623ec7c103c1eece4c94ea9825944dcf08dce6c63bbb9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.