Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/contentDisposition"

Index

Variables

Private Const ENCODE_URL_ATTR_CHAR_REGEXP

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

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}/

RegExp to match percent encoding escape.

Private Const NON_LATIN1_REGEXP

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

RegExp to match non-latin1 characters.

Private Const QUOTE_REGEXP

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

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

Private Const TEXT_REGEXP

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

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|~-]+$/

Functions

Const contentDisposition

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

Private createParams

  • createParams(filename?: string): any

Private format

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

Private getLatin1

  • getLatin1(val: any): string

Private pencode

  • pencode(char: any): string

Private qString

  • qString(val: any): string

Private uString

  • uString(val: any): string

Generated using TypeDoc