Node-Red configuration
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.

formats.js 476B

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