MCPcopy
hub / github.com/fastify/fastify / toString

Method toString

lib/content-type.js:143–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141 get parameters () { return this.#parameters }
142
143 toString () {
144 /* c8 ignore next: we don't need to verify the cache */
145 if (this.#string) return this.#string
146 const parameters = []
147 for (const [key, value] of this.#parameters.entries()) {
148 parameters.push(`${key}="${value}"`)
149 }
150 const result = [this.#type, '/', this.#subtype]
151 if (parameters.length > 0) {
152 result.push('; ')
153 result.push(parameters.join('; '))
154 }
155 this.#string = result.join('')
156 return this.#string
157 }
158}
159
160module.exports = ContentType

Callers 15

buildDefaultGenReqIdFunction · 0.80
handleRequestFunction · 0.80
anonymous0Function · 0.80
toJSONFunction · 0.80
getFuncPreviewFunction · 0.80
delete.test.jsFile · 0.80
404s.test.jsFile · 0.80
500s.test.jsFile · 0.80

Calls

no outgoing calls

Tested by 2

optGenReqIdFunction · 0.64
fnFunction · 0.64