1 | ;
|
2 |
|
3 | var replace = String.prototype.replace;
|
4 | var percentTwenties = /%20/g;
|
5 |
|
6 | var Format = {
|
7 | RFC1738: 'RFC1738',
|
8 | RFC3986: 'RFC3986'
|
9 | };
|
10 |
|
11 | module.exports = {
|
12 | 'default': Format.RFC3986,
|
13 | formatters: {
|
14 | RFC1738: function (value) {
|
15 | return replace.call(value, percentTwenties, '+');
|
16 | },
|
17 | RFC3986: function (value) {
|
18 | return String(value);
|
19 | }
|
20 | },
|
21 | RFC1738: Format.RFC1738,
|
22 | RFC3986: Format.RFC3986
|
23 | };
|