* @returns {{ script?: string[]; variant?: string[]; [key: string]: string }} parsed META tags of a spec file
()
| 389 | * @returns {{ script?: string[]; variant?: string[]; [key: string]: string }} parsed META tags of a spec file |
| 390 | */ |
| 391 | getMeta() { |
| 392 | const matches = this.getContent().match(/\/\/ META: .+/g); |
| 393 | if (!matches) { |
| 394 | return {}; |
| 395 | } |
| 396 | const result = {}; |
| 397 | for (const match of matches) { |
| 398 | const parts = match.match(/\/\/ META: ([^=]+?)=(.+)/); |
| 399 | const key = parts[1]; |
| 400 | const value = parts[2]; |
| 401 | if (key === 'script' || key === 'variant') { |
| 402 | if (result[key]) { |
| 403 | result[key].push(value); |
| 404 | } else { |
| 405 | result[key] = [value]; |
| 406 | } |
| 407 | } else { |
| 408 | result[key] = value; |
| 409 | } |
| 410 | } |
| 411 | return result; |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | const kIntlRequirement = { |
no test coverage detected