-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathrepl.txt
More file actions
36 lines (28 loc) · 809 Bytes
/
repl.txt
File metadata and controls
36 lines (28 loc) · 809 Bytes
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
{{alias}}( header )
Parses a Link header.
The implementation is intended for pragmatic parsing of pagination Link
headers and is not a standards-complete general-purpose parser.
Header values longer than 2000 characters return `null`.
Parameters
----------
header: string
Header string to parse.
Returns
-------
out: Object|null
Parsed links or null.
Examples
--------
> var header = '<https://api.github.com/user/repos?page=2>; rel="next"';
> var out = {{alias}}( header )
{
... 'next': {
... 'url': 'https://api.github.com/user/repos?page=2',
... 'page': '2',
... 'rel': 'next'
... }
... }
> out = {{alias}}( 'beep; boop' )
null
See Also
--------