(accept: string)
| 71 | } |
| 72 | |
| 73 | function parseAcceptLanguage(accept: string): LanguageSpecificity[] { |
| 74 | const accepts = accept.split(","); |
| 75 | const result: LanguageSpecificity[] = []; |
| 76 | |
| 77 | for (const [i, accept] of accepts.entries()) { |
| 78 | const language = parseLanguage(accept.trim(), i); |
| 79 | if (language) { |
| 80 | result.push(language); |
| 81 | } |
| 82 | } |
| 83 | return result; |
| 84 | } |
| 85 | |
| 86 | function specify( |
| 87 | language: string, |
no test coverage detected