formats.js 395 B

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