()
| 174 | get parameters () { return this.#parameters } |
| 175 | |
| 176 | toString () { |
| 177 | /* c8 ignore next: we don't need to verify the cache */ |
| 178 | if (this.#string) return this.#string |
| 179 | const parameters = [] |
| 180 | for (const [key, value] of this.#parameters.entries()) { |
| 181 | parameters.push(`${key}="${value}"`) |
| 182 | } |
| 183 | const result = [this.#type, '/', this.#subtype] |
| 184 | if (parameters.length > 0) { |
| 185 | result.push('; ') |
| 186 | result.push(parameters.join('; ')) |
| 187 | } |
| 188 | this.#string = result.join('') |
| 189 | return this.#string |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | module.exports = ContentType |
no outgoing calls