ParamMap

ParamMap

Stable Interface

Interface Overview

interface ParamMap {
  has(name: string) : boolean
  get(name: string) : string|
  null 
  getAll(name: string) : string[]
}

Interface Description

Matrix and Query parameters.

ParamMap makes it easier to work with parameters as they could have either a single value or multiple value. Because this should be known by the user, calling get or getAll returns the correct type (either string or string[]).

The API is inspired by the URLSearchParams interface. see 登录查看完整内容