@types/accepts
- Version 1.3.7
- Published
- 7.01 kB
- 1 dependency
- MIT license
Install
npm i @types/accepts
yarn add @types/accepts
pnpm add @types/accepts
Overview
TypeScript definitions for accepts
Index
Functions
function accepts
accepts: (req: IncomingMessage) => accepts.Accepts;
Interfaces
interface Accepts
interface Accepts {}
method charset
charset: { (): string[]; (charsets: string[]): string | false; (...charsets: string[]): string | false;};
Return the first accepted charset. If nothing in
charsets
is accepted, thenfalse
is returned. If no charsets are supplied, all accepted charsets are returned, in the order of the client's preference (most preferred first).
method charsets
charsets: { (): string[]; (charsets: string[]): string | false; (...charsets: string[]): string | false;};
Return the first accepted charset. If nothing in
charsets
is accepted, thenfalse
is returned. If no charsets are supplied, all accepted charsets are returned, in the order of the client's preference (most preferred first).
method encoding
encoding: { (): string[]; (encodings: string[]): string | false; (...encodings: string[]): string | false;};
Return the first accepted encoding. If nothing in
encodings
is accepted, thenfalse
is returned. If no encodings are supplied, all accepted encodings are returned, in the order of the client's preference (most preferred first).
method encodings
encodings: { (): string[]; (encodings: string[]): string | false; (...encodings: string[]): string | false;};
Return the first accepted encoding. If nothing in
encodings
is accepted, thenfalse
is returned. If no encodings are supplied, all accepted encodings are returned, in the order of the client's preference (most preferred first).
method lang
lang: { (): string[]; (languages: string[]): string | false; (...languages: string[]): string | false;};
Return the first accepted language. If nothing in
languages
is accepted, thenfalse
is returned. If no languaes are supplied, all accepted languages are returned, in the order of the client's preference (most preferred first).
method langs
langs: { (): string[]; (languages: string[]): string | false; (...languages: string[]): string | false;};
Return the first accepted language. If nothing in
languages
is accepted, thenfalse
is returned. If no languaes are supplied, all accepted languages are returned, in the order of the client's preference (most preferred first).
method language
language: { (): string[]; (languages: string[]): string | false; (...languages: string[]): string | false;};
Return the first accepted language. If nothing in
languages
is accepted, thenfalse
is returned. If no languaes are supplied, all accepted languages are returned, in the order of the client's preference (most preferred first).
method languages
languages: { (): string[]; (languages: string[]): string | false; (...languages: string[]): string | false;};
Return the first accepted language. If nothing in
languages
is accepted, thenfalse
is returned. If no languaes are supplied, all accepted languages are returned, in the order of the client's preference (most preferred first).
method type
type: { (types: string[]): string[] | string | false; (...types: string[]): string | false | string[];};
Return the first accepted type (and it is returned as the same text as what appears in the
types
array). If nothing intypes
is accepted, thenfalse
is returned. If no types are supplied, return the entire set of acceptable types.The
types
array can contain full MIME types or file extensions. Any value that is not a full MIME types is passed torequire('mime-types').lookup
.
method types
types: { (types: string[]): string[] | string | false; (...types: string[]): string | false | string[];};
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/accepts
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/accepts)
- HTML<a href="https://www.jsdocs.io/package/@types/accepts"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2622 ms. - Missing or incorrect documentation? Open an issue for this package.