-
Notifications
You must be signed in to change notification settings - Fork 16
/
urlqueryparametercollection.yml
94 lines (88 loc) · 3.5 KB
/
urlqueryparametercollection.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
### YamlMime:TSType
name: UrlQueryParameterCollection
uid: '@microsoft/sp-core-library!UrlQueryParameterCollection:class'
package: '@microsoft/sp-core-library!'
fullName: UrlQueryParameterCollection
summary: Provides features for storing and retrieving URL query parameters.
remarks: >-
The URL can be server-relative, and it can also be an empty or null string. The query parameters must start with "?"
to indicate the first query parameter and use "&" for all subsequent parameters. The class also supports
fragments.
Edge case behavior:
Empty value (www.example.com/?test=) stores key and empty value No equals in queryParam (www.example.com/?test) stores
key and undefined value Empty queryParam (www.example.com/?&debug=on) stores undefined key and value Query param
with only equals (www.example.com/?=&debug=on stores empty string key and value
isPreview: false
isDeprecated: true
customDeprecatedMessage: Use the URLSearchParams browser API instead. The SharePoint Framework includes a polyfill for older browsers.
type: class
constructors:
- name: (constructor)(url)
uid: '@microsoft/sp-core-library!UrlQueryParameterCollection:constructor(1)'
package: '@microsoft/sp-core-library!'
fullName: (constructor)(url)
summary: Constructs a new instance of the `UrlQueryParameterCollection` class
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'constructor(url: string);'
parameters:
- id: url
description: ''
type: string
methods:
- name: getValue(param)
uid: '@microsoft/sp-core-library!UrlQueryParameterCollection#getValue:member(1)'
package: '@microsoft/sp-core-library!'
fullName: getValue(param)
summary: Returns the value of the first matching query parameter or undefined if the key doesn't exist.
remarks: |-
Examples:
```
this._queryParameterList = [
{key: TEST, value: done},
{key: DEBUG, value: false},
{key: TEST, value: notdone}]
getValue('TEST') ---> 'done'
getValue('debug') ---> 'false'
getValue('lost') ---> undefined
```
isPreview: false
isDeprecated: false
syntax:
content: 'getValue(param: string): string | undefined;'
parameters:
- id: param
description: the case insensitive key for the desired query parameter value.
type: string
return:
type: string | undefined
description: ''
- name: getValues(param)
uid: '@microsoft/sp-core-library!UrlQueryParameterCollection#getValues:member(1)'
package: '@microsoft/sp-core-library!'
fullName: getValues(param)
summary: Returns the values of all of the matching query parameters or undefined if the key doesn't exist.
remarks: |-
Examples:
```
this._queryParameterList = [
{key: TEST, value: done},
{key: DEBUG, value: false},
{key: TEST, value: notdone}]
getValues('TEST') ---> ['done', 'notdone']
getValues('debug') ---> ['false']
getValues('lost') ---> undefined
```
isPreview: false
isDeprecated: false
syntax:
content: 'getValues(param: string): (string | undefined)[] | undefined;'
parameters:
- id: param
description: the case insensitive key for the desired query parameter value.
type: string
return:
type: '(string | undefined)[] | undefined'
description: ''