Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@types/content-disposition
Advanced tools
Readme
npm install --save @types/content-disposition
This package contains type definitions for content-disposition (https://github.com/jshttp/content-disposition).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/content-disposition.
declare namespace contentDisposition {
/**
* Class for parsed Content-Disposition header for v8 optimization
*/
interface ContentDisposition {
/**
* The disposition type (always lower case)
*/
type: "attachment" | "inline" | string;
/**
* An object of the parameters in the disposition
* (name of parameter always lower case and extended versions replace non-extended versions)
*/
parameters: { [key: string]: string };
}
interface Options {
/**
* Specifies the disposition type.
* This can also be "inline", or any other value (all values except `inline` are treated like attachment,
* but can convey additional information if both parties agree to it).
* The `type` is normalized to lower-case.
* @default 'attachment'
*/
type?: "attachment" | "inline" | string | undefined;
/**
* If the filename option is outside ISO-8859-1,
* then the file name is actually stored in a supplemental field for clients
* that support Unicode file names and a ISO-8859-1 version of the file name is automatically generated
* @default true
*/
fallback?: string | boolean | undefined;
}
/**
* Parse a Content-Disposition header string
*/
function parse(contentDispositionHeader: string): ContentDisposition;
}
/**
* Create an attachment `Content-Disposition` header value using the given file name, if supplied.
* The `filename` is optional and if no file name is desired, but you want to specify options, set `filename` to undefined.
*/
declare function contentDisposition(filename?: string, options?: contentDisposition.Options): string;
export = contentDisposition;
These definitions were written by Stefan Reichel, and Piotr Błażejewicz.
FAQs
TypeScript definitions for content-disposition
The npm package @types/content-disposition receives a total of 1,396,011 weekly downloads. As such, @types/content-disposition popularity was classified as popular.
We found that @types/content-disposition demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.