@types/caseless
TypeScript icon, indicating that this package has built-in type declarations

0.12.5 • Public • Published

Installation

npm install --save @types/caseless

Summary

This package contains type definitions for caseless (https://github.com/mikeal/caseless).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/caseless.

index.d.ts

type KeyType = string;
type ValueType = any;
type RawDict = object;

declare function caseless(dict?: RawDict): caseless.Caseless;

declare namespace caseless {
    function httpify(resp: object, headers: RawDict): Caseless;

    interface Caseless {
        set(name: KeyType, value: ValueType, clobber?: boolean): KeyType | false;
        set(dict: RawDict): void;
        has(name: KeyType): KeyType | false;
        get(name: KeyType): ValueType | undefined;
        swap(name: KeyType): void;
        del(name: KeyType): boolean;
    }

    interface Httpified {
        headers: RawDict;
        setHeader(name: KeyType, value: ValueType, clobber?: boolean): KeyType | false;
        setHeader(dict: RawDict): void;
        hasHeader(name: KeyType): KeyType | false;
        getHeader(name: KeyType): ValueType | undefined;
        removeHeader(name: KeyType): boolean;
    }
}

export = caseless;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by downace, Matt R. Wilson, and Emily Klassen.

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.12.5
    2,587,612
  • 0.12.4
    134,067
  • 0.12.3
    59,039
  • 0.12.2
    1,034,378
  • 0.12.1
    60,888
  • 0.12.0
    90

Package Sidebar

Install

npm i @types/caseless

Weekly Downloads

3,876,074

Version

0.12.5

License

MIT

Unpacked Size

4.72 kB

Total Files

5

Last publish

Collaborators

  • types