You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
387 B

  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 value;
  12. }
  13. },
  14. RFC1738: 'RFC1738',
  15. RFC3986: 'RFC3986'
  16. };