UNPKG

1.59 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/caseless`
3
4# Summary
5This package contains type definitions for caseless (https://github.com/mikeal/caseless).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/caseless.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/caseless/index.d.ts)
10````ts
11type KeyType = string;
12type ValueType = any;
13type RawDict = object;
14
15declare function caseless(dict?: RawDict): caseless.Caseless;
16
17declare namespace caseless {
18 function httpify(resp: object, headers: RawDict): Caseless;
19
20 interface Caseless {
21 set(name: KeyType, value: ValueType, clobber?: boolean): KeyType | false;
22 set(dict: RawDict): void;
23 has(name: KeyType): KeyType | false;
24 get(name: KeyType): ValueType | undefined;
25 swap(name: KeyType): void;
26 del(name: KeyType): boolean;
27 }
28
29 interface Httpified {
30 headers: RawDict;
31 setHeader(name: KeyType, value: ValueType, clobber?: boolean): KeyType | false;
32 setHeader(dict: RawDict): void;
33 hasHeader(name: KeyType): KeyType | false;
34 getHeader(name: KeyType): ValueType | undefined;
35 removeHeader(name: KeyType): boolean;
36 }
37}
38
39export = caseless;
40
41````
42
43### Additional Details
44 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
45 * Dependencies: none
46
47# Credits
48These definitions were written by [downace](https://github.com/downace), [Matt R. Wilson](https://github.com/mastermatt), and [Emily Klassen](https://github.com/forivall).
49
\No newline at end of file