MCPcopy
hub / github.com/tinyhttp/tinyhttp / contentDisposition

Function contentDisposition

packages/content-disposition/src/index.ts:121–130  ·  view source on GitHub ↗
(
  filename?: string,
  options: Partial<{
    type: string
    fallback: string | boolean
  }> = {}
)

Source from the content-addressed store, hash-verified

119 */
120
121export function contentDisposition(
122 filename?: string,
123 options: Partial<{
124 type: string
125 fallback: string | boolean
126 }> = {}
127) {
128 // format into string
129 return format(new ContentDisposition(options.type || 'attachment', createParams(filename, options.fallback)))
130}
131
132function decodefield(str: string) {
133 const match = EXT_VALUE_REGEXP.exec(str)

Callers 3

downloadFunction · 0.90
attachmentFunction · 0.90

Calls 2

formatFunction · 0.85
createParamsFunction · 0.85

Tested by

no test coverage detected