main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
476 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
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 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.