## Index

### Variables

- ENCODE_URL_ATTR_CHAR_REGEXP
- HEX_ESCAPE_REGEXP
- NON_LATIN1_REGEXP
- QUOTE_REGEXP
- TEXT_REGEXP
- TOKEN_REGEXP

### Functions

- contentDisposition
- createParams
- format
- getLatin1
- pencode
- qString
- uString

## Variables

### Private Const ENCODE_URL_ATTR_CHAR_REGEXP

ENCODE_URL_ATTR_CHAR_REGEXP: RegExp = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g

- Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:38

RegExp to match non attr-char, after encodeURIComponent (i.e. not including "%")

### Private Const HEX_ESCAPE_REGEXP

HEX_ESCAPE_REGEXP: RegExp = /%[0-9A-Fa-f]{2}/

- Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:44

RegExp to match percent encoding escape.

### Private Const NON_LATIN1_REGEXP

NON_LATIN1_REGEXP: RegExp = /[^\x20-\x7e\xa0-\xff]/g

- Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:50

RegExp to match non-latin1 characters.

### Private Const QUOTE_REGEXP

QUOTE_REGEXP: RegExp = /([\\"])/g

- Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:56

RegExp to match chars that must be quoted-pair in RFC 2616

### Private Const TEXT_REGEXP

TEXT_REGEXP: RegExp = /^[\x20-\x7e\x80-\xff]+$/

- Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:82

RegExp for constious RFC 2616 grammar

parameter = token "=" ( token | quoted-string ) token = 1* separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT quoted-string = ( <"> (qdtext | quoted-pair ) <"> ) qdtext = <any TEXT except <">> quoted-pair = "" CHAR CHAR = <any US-ASCII character (octets 0 - 127)> TEXT = <any OCTET except CTLs, but including LWS> LWS = [CRLF] 1( SP | HT ) CRLF = CR LF CR = <US-ASCII CR, carriage return (13)> LF = <US-ASCII LF, linefeed (10)> SP = <US-ASCII SP, space (32)> HT = <US-ASCII HT, horizontal-tab (9)> CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)> OCTET = <any 8-bit sequence of data>

### Const TOKEN_REGEXP

TOKEN_REGEXP: RegExp = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/

- Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:83

## Functions

### Const contentDisposition

- contentDisposition(type: string, filename?: string): string

- - Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:227

  Creates a Content-Disposition Header value from a type and an optional filename.

  #### Parameters

  - ##### type: string

  - ##### Optional filename: string

  #### Returns string

### Private createParams

- createParams(filename?: string): any

- - Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:104

  Create parameters object from filename and fallback.

  #### Parameters

  - ##### Optional filename: string

  #### Returns any

### Private format

- format(__namedParameters: { parameters: any; type: string }): string

- - Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:191

  Format object to Content-Disposition header.

  #### Parameters

  - ##### __namedParameters: { parameters: any; type: string }

    - ##### parameters: any

    - ##### type: string

  #### Returns string

### Private getLatin1

- getLatin1(val: any): string

- - Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:92

  Get ISO-8859-1 version of string.

  #### Parameters

  - ##### val: any

  #### Returns string

### Private pencode

- pencode(char: any): string

- - Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:158

  Percent encode a single character.

  #### Parameters

  - ##### char: any

  #### Returns string

### Private qString

- qString(val: any): string

- - Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:145

  Quote a string for HTTP.

  #### Parameters

  - ##### val: any

  #### Returns string

### Private uString

- uString(val: any): string

- - Defined in home/runner/work/opine/opine/src/utils/contentDisposition.ts:172

  Encode a Unicode string for HTTP (RFC 5987).

  #### Parameters

  - ##### val: any

  #### Returns string

Generated using TypeDoc